googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
cloudhealthcarefhirpatienteverything.Config.Initialize requires a non-empty description; like the other tools in this repo the description is authored by the user in tools.yaml and cannot be defaulted. An empty value stops tool construction.
Source
Thrown at internal/tools/cloudhealthcare/cloudhealthcarefhirpatienteverything/cloudhealthcarefhirpatienteverything.go:75
}
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 meaningful non-empty description to the tool's yaml block
- Verify the key is exactly 'description' and non-empty
- Check anchors/overrides don't reset it to ""
Example fix
// before
patient-everything:
kind: cloud-healthcare-fhir-patient-everything
source: healthcare-src
// after
patient-everything:
kind: cloud-healthcare-fhir-patient-everything
source: healthcare-src
description: "Retrieve all FHIR resources for a patient via Patient/$everything" 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
- Always author description for patient-everything tool entries
- Lint tools.yaml keys to catch misspellings
- Boot the server locally to validate config before deploy
When it happens
Trigger: A cloud-healthcare-fhir-patient-everything tool entry in tools.yaml with no description field or an empty string value.
Common situations: Omitting description in a quickstart-style minimal config; YAML anchors or templating blanking the field; key typo leaving the struct field 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
- 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/e5cd8c52ecc1456d.
Report an issue: GitHub.