googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
During looker-get-dashboards Config.Initialize, a guard rejects configurations whose `description` field is empty. The description becomes the tool's manifest description that MCP/LLM clients rely on, so an empty one makes the tool config invalid and initialization aborts.
Source
Thrown at internal/tools/looker/lookergetdashboards/lookergetdashboards.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)
}
titleParameter := parameters.NewStringParameter("title", "The title of the dashboard.", parameters.WithStringDefault(""))
descParameter := parameters.NewStringParameter("desc", "The description of the dashboard.", parameters.WithStringDefault(""))
limitParameter := parameters.NewIntParameter("limit", "The number of dashboards to fetch. Default 100", parameters.WithIntDefault(100))
offsetParameter := parameters.NewIntParameter("offset", "The number of dashboards to skip before fetching. Default 0", parameters.WithIntDefault(0))
params := parameters.Parameters{
titleParameter,
descParameter,
limitParameter,
offsetParameter,
}
// finish tool setup
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations),View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty `description` to the looker-get-dashboards tool entry in tools.yaml.
- Check YAML indentation so `description` is a child of the tool, not a sibling.
- When constructing configs programmatically, set cfg.Description before calling Initialize.
- Run `toolbox validate` in CI to catch missing descriptions before serving.
Example fix
// before (tools.yaml)
get-dashboards:
kind: looker-get-dashboards
source: my-looker
// after
get-dashboards:
kind: looker-get-dashboards
source: my-looker
description: Searches and lists Looker dashboards by title or description. Defensive patterns
Strategy: validation
Validate before calling
if strings.TrimSpace(cfg.Description) == "" {
return errors.New("tool 'get-dashboards': description is required")
} Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil {
log.Fatalf("invalid looker-get-dashboards config: %v", err)
} Prevention
- Give every tool entry a description in tools.yaml.
- Run `toolbox validate` in CI to catch missing descriptions.
- Lint YAML configs for required keys (name, kind, source, description).
- Avoid generators that omit optional description fields.
When it happens
Trigger: Loading a tools.yaml with a tool of kind looker-get-dashboards that has no `description` field, or building the Config in Go with Name set but Description empty and calling Initialize.
Common situations: Hand-edited YAML omitting the description; description indented under the wrong key; config generators/templating producing an empty string.
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/500df0d2c53fa540.
Report an issue: GitHub.