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 lookercreatedashboardlayout tool enforces that a non-empty 'description' field is present in the tool configuration before constructing the tool. Descriptions are exposed to the LLM as the tool's usage guidance, so the library treats a missing one as an invalid configuration and aborts initialization. The configured tool name is included to locate the failing YAML entry.
Source
Thrown at internal/tools/looker/lookercreatedashboardlayout/lookercreatedashboardlayout.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)
}
dashboardIdParam := parameters.NewStringParameter("dashboard_id", "The ID of the dashboard to create the layout for.")
labelParam := parameters.NewStringParameter("label", "The label (title) of the layout/tab.")
typeParam := parameters.NewStringParameter("type", "The type of layout (e.g. 'newspaper', 'grid'). Defaults to 'newspaper'.", parameters.WithStringDefault("newspaper"))
activeParam := parameters.NewBooleanParameter("active", "Whether this layout should be active.", parameters.WithBooleanDefault(false))
params := parameters.Parameters{
dashboardIdParam,
labelParam,
typeParam,
activeParam,
}
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewWriteAnnotations),View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty 'description' to the looker-create-dashboard-layout tool definition.
- Fix templating/rendering so the description is never interpolated to an empty string.
- Restart the toolbox and confirm the tool initializes cleanly.
Example fix
# before
tools:
create_layout:
kind: looker-create-dashboard-layout
source: my-looker-instance
# after
tools:
create_layout:
kind: looker-create-dashboard-layout
source: my-looker-instance
description: Creates a new layout/tab for an existing Looker dashboard. Defensive patterns
Strategy: validation
Validate before calling
// Go: pre-flight required fields for this tool kind
type toolCfg struct { Kind, Description string }
func validateDashboardLayoutCfg(c toolCfg) error {
if c.Kind == "looker-create-dashboard-layout" && strings.TrimSpace(c.Description) == "" {
return fmt.Errorf("%s requires a non-empty description", c.Kind)
}
return nil
} Try / catch
if err := toolbox.LoadConfig(ctx, cfgPath); err != nil {
if strings.Contains(err.Error(), "description is required for tool") {
log.Fatalf("add 'description' to the looker-create-dashboard-layout tool: %v", err)
}
return err
} Prevention
- Include a clear description for every tool entry in tools.yaml.
- Add CI linting that fails on empty required config fields.
- Guard templated configs so descriptions cannot render as empty.
- Re-check required fields whenever changing a tool's kind.
When it happens
Trigger: Starting or reloading the toolbox with a looker-create-dashboard-layout tool entry whose 'description' field is absent or empty.
Common situations: Omitting the description when hand-writing tools.yaml; config templating that renders an empty value; migrating tools between kinds without re-checking required fields.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- description is required for tool %q
- description is required for tool %q
- error parsing argument: %w
- invalid role %q: must be 'user' or 'assistant'
- description is required for tool %q
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/2f28dfdd2324b58f.
Report an issue: GitHub.