googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
Initialize for the looker-update-dashboard-element tool rejects configs with an empty `description`. The description is mandatory because it is exposed to MCP clients as the tool's usage documentation; registration is aborted with this error otherwise.
Source
Thrown at internal/tools/looker/lookerupdatedashboardelement/lookerupdatedashboardelement.go:72
}
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 := lookercommon.GetQueryParameters()
dashboardIdParam := parameters.NewStringParameter("dashboard_id", "The ID of the dashboard containing the element.")
params = append(params, dashboardIdParam)
elementIdParam := parameters.NewStringParameter("dashboard_element_id", "The ID of the dashboard element to update.")
params = append(params, elementIdParam)
titleParam := parameters.NewStringParameter("title", "The new title of the element.", parameters.WithStringDefault(""))
params = append(params, titleParam)
visConfigParam := parameters.NewMapParameter("vis_config", "The new visualization configuration.", "", parameters.WithMapDefault(map[string]any{}))
params = append(params, visConfigParam)
dashFilters := parameters.NewArrayParameter(
"dashboard_filters",
`An array of dashboard filters like [{"dashboard_filter_name": "name", "field": "view_name.field_name"}, ...]`,
parameters.NewMapParameter(
"dashboard_filter",View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a descriptive `description:` string to the tool entry
- Fix the generating template so description is always emitted
- Pre-validate configs for required fields before server start
Example fix
// before
tools:
update_dashboard_element:
kind: looker-update-dashboard-element
source: my-looker-source
// after
tools:
update_dashboard_element:
kind: looker-update-dashboard-element
source: my-looker-source
description: Update a dashboard element's properties in Looker. Defensive patterns
Strategy: validation
Validate before calling
if cfg.Description == "" {
return errors.New("looker-update-dashboard-element 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("add `description` to tool %q in tools.yaml", cfg.Name)
}
return err
} Prevention
- Add a schema check in CI that every tool entry has a non-empty description
- Use config templates that require description explicitly
- Review diffs of tools.yaml for removed description lines
When it happens
Trigger: A tool definition of kind looker-update-dashboard-element lacks `description:` (or it is empty string) when Initialize runs during config load.
Common situations: Omitting description while hand-editing tools.yaml; config generators dropping empty fields; copying a tool block and deleting the description line.
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/e112807e68815bd5.
Report an issue: GitHub.