googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
Initialize for looker-update-dashboard-layout-component enforces a non-empty `description` on the tool config before constructing its parameters. The description is required for MCP tool registration, so an empty one aborts initialization with this error.
Source
Thrown at internal/tools/looker/lookerupdatedashboardlayoutcomponent/lookerupdatedashboardlayoutcomponent.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)
}
componentIdParam := parameters.NewStringParameter("dashboard_layout_component_id", "The ID of the dashboard layout component to update.")
layoutIdParam := parameters.NewStringParameter("dashboard_layout_id", "The ID of the target dashboard layout (tab) to move the component to.", parameters.WithStringRequired(false))
rowParam := parameters.NewIntParameter("row", "The new row position.", parameters.WithIntRequired(false))
columnParam := parameters.NewIntParameter("column", "The new column position.", parameters.WithIntRequired(false))
widthParam := parameters.NewIntParameter("width", "The new width.", parameters.WithIntRequired(false))
heightParam := parameters.NewIntParameter("height", "The new height.", parameters.WithIntRequired(false))
params := parameters.Parameters{
componentIdParam,
layoutIdParam,
rowParam,
columnParam,
widthParam,
heightParam,
}
View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty `description:` to the tool entry
- Fix the config generator/template to always emit description
- Add a startup-time validation that all tool configs have descriptions
Example fix
// before
tools:
update_layout_component:
kind: looker-update-dashboard-layout-component
source: my-looker-source
// after
tools:
update_layout_component:
kind: looker-update-dashboard-layout-component
source: my-looker-source
description: Update or move a dashboard layout component within a Looker dashboard. Defensive patterns
Strategy: validation
Validate before calling
if cfg.Description == "" {
return errors.New("looker-update-dashboard-layout-component tool requires a non-empty description")
} Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil {
if strings.Contains(err.Error(), "description is required") {
return fmt.Errorf("set `description` for tool %q", cfg.Name)
}
return err
} Prevention
- Require description in your tool YAML schema/lint
- Never generate tool entries without a description value
- Add a boot-time precheck listing tools missing descriptions
When it happens
Trigger: A kind looker-update-dashboard-layout-component tool entry is parsed with no `description:` field or an empty string, during server startup or dynamic config load.
Common situations: Hand-written configs missing the description; templating that omits empty values; bulk config migrations that dropped the field.
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/a008f8d600645a6a.
Report an issue: GitHub.