googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
cloudhealthcarefhirfetchpage.Config.Initialize requires a non-empty description before building the tool; this tool does not supply a default description, so the user must provide one in tools.yaml. Failure aborts tool creation with the tool's name in the message.
Source
Thrown at internal/tools/cloudhealthcare/cloudhealthcarefhirfetchpage/cloudhealthcarefhirfetchpage.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)
}
urlParameter := parameters.NewStringParameter(pageURLKey, "The full URL of the FHIR page to fetch. This would be the value of `Bundle.entry.link.url` field within the response returned from FHIR search or FHIR patient everything operations.")
allParameters := parameters.Parameters{urlParameter}
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations),
tools.Manifest{Description: cfg.Description, Parameters: allParameters.Manifest(), AuthRequired: cfg.AuthRequired},
allParameters,
),
}, nil
}
// validate interface
var _ tools.Tool = Tool{}
View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty description to the tool's yaml block
- Verify exact key spelling 'description' with no empty anchors
- Re-run the server to confirm the tool loads
Example fix
// before
fetch-page:
kind: cloud-healthcare-fhir-fetch-page
source: fhir-src
// after
fetch-page:
kind: cloud-healthcare-fhir-fetch-page
source: fhir-src
description: "Fetch a page of FHIR resources using a bundle link URL" Defensive patterns
Strategy: validation
Validate before calling
func checkDescription(cfg map[string]any) error {
d, _ := cfg["description"].(string)
if d == "" { return errors.New("description is required") }
return nil
} Prevention
- Include description in every cloud-healthcare tool definition
- Validate tools.yaml in CI by starting the toolbox once
When it happens
Trigger: A cloud-healthcare-fhir-fetch-page tool entry in tools.yaml missing the description field or with description: "".
Common situations: Minimal config examples copied without the description line; templates/anchors leaving the field empty; misspelled key so the struct field stays 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
- doc %d: unexpected non-string key in input: %v
- doc %d: invalid config format at key %q: %w
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/1e48d1836157a0de.
Report an issue: GitHub.