googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
Config.Initialize for clickhouse-list-databases validates that every tool needs a non-empty `description`, since descriptions are exposed to LLM clients in the tool manifest. An empty description makes the tool useless to model clients, so initialization fails fast.
Source
Thrown at internal/tools/clickhouse/clickhouselistdatabases/clickhouselistdatabases.go:65
}
type Config struct {
tools.ConfigBase `yaml:",inline"`
Type string `yaml:"type" validate:"required"`
Source string `yaml:"source" validate:"required"`
Parameters parameters.Parameters `yaml:"parameters"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`
}
var _ tools.ToolConfig = Config{}
func (cfg Config) ToolConfigType() string {
return listDatabasesType
}
func (cfg Config) Initialize(context.Context) (tools.Tool, error) {
if cfg.Description == "" {
return nil, fmt.Errorf("description is required for tool %q", cfg.Name)
}
allParameters, paramManifest, err := parameters.ProcessParameters(nil, cfg.Parameters)
if err != nil {
return nil, err
}
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations),
tools.Manifest{Description: cfg.Description, Parameters: paramManifest, AuthRequired: cfg.AuthRequired},
allParameters,
),
}, nil
}
var _ tools.Tool = Tool{}View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty `description` field to the tool's YAML block.
- Fix key typos so the value actually lands in Config.Description.
- If building Config in code, set Description before calling Initialize.
Example fix
// before source: my-clickhouse name: list_databases // after source: my-clickhouse name: list_databases description: List all databases in the ClickHouse instance.
Defensive patterns
Strategy: validation
Validate before calling
// Go
cfg := Config{Name: "list_databases", /* ... */}
if cfg.Description == "" {
return errors.New("clickhouse-list-databases requires a non-empty description")
}
if _, err := cfg.Initialize(context.Background()); err != nil {
return err
} Prevention
- Treat `description` as mandatory in every tool block.
- Lint YAML configs for required keys (yamllint custom schema).
- Keep descriptions user/LLM-oriented and specific to the database.
When it happens
Trigger: Loading a YAML tools file where a `clickhouse-list-databases` tool entry omits the `description` field or sets it to ""; constructing Config{Name: "x"} in Go and calling Initialize directly (as the unit tests do).
Common situations: Hand-written minimal tool configs; generated configs with dropped fields; YAML key typo like `descriptions:` so Description unmarshals empty.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- description is required for tool %q
- description is required for tool %q
- description is required for tool %q
- description is required for tool %q
- description is required for tool %q
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/05175f21f43caaed.
Report an issue: GitHub.