googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
This error is thrown by Config.Initialize when a cloudhealthcare-get-dicom-store tool is defined without a non-empty description. The toolbox requires every tool to carry a human-readable description so agents/LLMs know what the tool does. Initialization fails fast rather than registering an undescribed tool.
Source
Thrown at internal/tools/cloudhealthcare/cloudhealthcaregetdicomstore/cloudhealthcaregetdicomstore.go:69
}
type Config struct {
tools.ConfigBase `yaml:",inline"`
Type string `yaml:"type" validate:"required"`
Source string `yaml:"source" validate:"required"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`
}
// validate interface
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)
}
params := buildParams(false)
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations),
tools.Manifest{Description: cfg.Description, Parameters: params.Manifest(), AuthRequired: cfg.AuthRequired},
params,
),
}, nil
}
// validate interface
var _ tools.Tool = Tool{}
type Tool struct {
tools.BaseTool[Config]View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty description field to the tool's YAML config
- Set cfg.Description programmatically before calling Initialize
- Validate the config early in startup so the failure points at the right file
Example fix
# before
tools:
get_dicom_store:
kind: cloud-healthcare-get-dicom-store
# after
tools:
get_dicom_store:
kind: cloud-healthcare-get-dicom-store
description: Fetches a DICOM store from Cloud Healthcare API Defensive patterns
Strategy: validation
Validate before calling
if cfg.Description == "" {
return fmt.Errorf("tool %q is missing a description", cfg.Name)
} Prevention
- Always include a description field in every tool YAML block
- Add a CI lint that parses tool configs and asserts description is non-empty
- Use config structs with required-field validation before Initialize
When it happens
Trigger: Calling Initialize on a Config whose Description field is the empty string (omitted in YAML config or set to "").
Common situations: YAML tool definitions that omit the description field; programmatic construction of Config that leaves Description unset; tooling that copies a config and drops the description.
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/90791b2158761bba.
Report an issue: GitHub.