googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
Config.Initialize for the cloudhealthcare-retrieve-rendered-dicom-instance tool requires a non-empty description. Descriptions are surfaced to the LLM as the tool's description in the MCP manifest; without one the tool would be unusable/undescribable, so initialization fails fast with this error.
Source
Thrown at internal/tools/cloudhealthcare/cloudhealthcareretrieverendereddicominstance/cloudhealthcareretrieverendereddicominstance.go:74
}
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 description field to the tool entry in tools.yaml
- Check YAML indentation so description lands under the tool config, not a sibling key
- If constructing Config in code, set cfg.Description before calling Initialize
Example fix
// before (tools.yaml)
tools:
retrieve-rendered-dicom-instance:
kind: cloudhealthcare-retrieve-rendered-dicom-instance
source: my-healthcare-source
// after
tools:
retrieve-rendered-dicom-instance:
kind: cloudhealthcare-retrieve-rendered-dicom-instance
source: my-healthcare-source
description: Retrieves a rendered (image/png) DICOM instance from a Cloud Healthcare DICOM store Defensive patterns
Strategy: validation
Validate before calling
// validate the tools.yaml entry before loading
cfg, err := config.ParseYaml(yamlBytes)
if err != nil {
log.Fatal(err)
}
for name, toolCfg := range cfg.Tools {
if toolCfg["description"] == "" {
log.Fatalf("tool %q is missing required description", name)
}
} Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil {
if strings.Contains(err.Error(), "description is required") {
log.Fatalf("add a description to tool in tools.yaml: %v", err)
}
return err
} Prevention
- Always include a description for every custom tool entry
- Validate tools.yaml with `toolbox --tools-file` before deploying
- Keep descriptions meaningful — they are shown to the LLM
When it happens
Trigger: Calling Initialize on a Config (at server startup when tools.yaml is parsed) where the tool entry has no description field or description: "".
Common situations: Writing a minimal tools.yaml entry and omitting the description field; YAML indentation errors putting description under the wrong key; programmatically constructing Config and leaving Description zero-valued.
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/8697bc7b1a44fb7e.
Report an issue: GitHub.