googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
looker-get-dashboard's Config.Initialize rejects configs with an empty description because tool descriptions are required metadata consumed by the LLM via the MCP manifest. An empty description means the tool definition is incomplete, so initialization fails instead of producing a tool with no usable documentation.
Source
Thrown at internal/tools/looker/lookergetdashboard/lookergetdashboard.go:71
}
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)
}
dashboardIdParameter := parameters.NewStringParameter("dashboard_id", "The id of the dashboard to retrieve.")
params := parameters.Parameters{
dashboardIdParameter,
}
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 interfaceView on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty description to the looker-get-dashboard tool entry.
- Ensure templated/variable descriptions actually resolve to non-empty values at load time.
- Pre-validate configs (schema or startup dry-run) to catch empty required fields.
- Copy the documented looker-get-dashboard example config including its description.
Example fix
# before
tools:
get-dashboard:
kind: looker-get-dashboard
source: my-looker
description: ""
# after
tools:
get-dashboard:
kind: looker-get-dashboard
source: my-looker
description: Retrieves a Looker dashboard by its ID. Defensive patterns
Strategy: validation
Validate before calling
// pre-load validation of the YAML config
for name, tool := range toolsCfg {
if tool.Description == "" {
return fmt.Errorf("tool %q: description is required", name)
}
} Type guard
func validDashboardToolConfig(c lookergetdashboard.Config) bool {
return c.Name != "" && c.Description != ""
} Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil {
log.Fatalf("looker-get-dashboard config invalid: %v", err)
} Prevention
- Never omit the description field in tool definitions.
- Add CI linting that rejects empty required config fields.
- Check that env-based templating fills descriptions non-emptily.
- Start from the documented looker-get-dashboard example.
When it happens
Trigger: Calling Initialize at startup with a looker-get-dashboard tool config whose description key is missing or set to an empty string (including when templating resolves to empty).
Common situations: Hand-written tools.yaml missing the description; environment-variable/param substitution yielding an empty string; trimmed-down example configs; automation that generates tool blocks without descriptions.
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/898a355daba60ecf.
Report an issue: GitHub.