googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
Initialize rejects a tool configuration whose 'description' field is empty. Description is mandatory for this tool type (it feeds the LLM tool manifest), so the error fires during startup when the tools.yaml entry omits or leaves blank the 'description' key.
Source
Thrown at internal/tools/mindsdb/mindsdbsql/mindsdbsql.go:69
type Config struct {
tools.ConfigBase `yaml:",inline"`
Type string `yaml:"type" validate:"required"`
Source string `yaml:"source" validate:"required"`
Statement string `yaml:"statement" validate:"required"`
Parameters parameters.Parameters `yaml:"parameters"`
TemplateParameters parameters.Parameters `yaml:"templateParameters"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`
}
var _ tools.ToolConfig = Config{}
func (cfg Config) ToolConfigType() string {
return resourceType
}
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(cfg.TemplateParameters, cfg.Parameters)
if err != nil {
return nil, err
}
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewDestructiveAnnotations),
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 meaningful non-empty `description` to the mindsdb-sql tool config
- If tools are generated from templates, assert description is set before writing the YAML
- Validate the config locally before deploying
Example fix
// before query: kind: mindsdb-sql source: my-mindsdb statement: SELECT * FROM tbl // after query: kind: mindsdb-sql source: my-mindsdb description: Run a parameterized SQL query on MindsDB. statement: SELECT * FROM tbl
Defensive patterns
Strategy: validation
Validate before calling
if cfg.Description == "" {
return errors.New("mindsdb-sql: description is required")
} Prevention
- Treat description as a mandatory field in tool templates
- CI-lint tools.yaml for empty strings on required fields
- Write meaningful descriptions since they guide LLM tool selection
When it happens
Trigger: Defining a tool with kind `mindsdb-sql` without a `description` (or with an empty string) in tools.yaml; Initialize runs during config parsing.
Common situations: Omitting description while hand-editing YAML; a template/generator that leaves description blank; removing a description during refactoring.
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/7a46652ceb8eb9af.
Report an issue: GitHub.