googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
Looker tools require a human-readable description at tool-initialization time. Config.Initialize returns this error when the Config's Description field is empty, because a tool cannot be registered with the MCP server without a description for the LLM.
Source
Thrown at internal/tools/looker/lookeradddashboardelement/lookeradddashboardelement.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()
dashIdParameter := parameters.NewStringParameter("dashboard_id", "The id of the dashboard where this tile will exist")
params = append(params, dashIdParameter)
titleParameter := parameters.NewStringParameter("title", "The title of the Dashboard Element", parameters.WithStringDefault(""))
params = append(params, titleParameter)
vizParameter := parameters.NewMapParameter(
"vis_config",
"The visualization config for the query",
"",
parameters.WithMapDefault(map[string]any{}),
)
params = append(params, vizParameter)
dashFilters := parameters.NewArrayParameter(
"dashboard_filters",View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty description field to the tool's YAML config, e.g. description: Adds an element to a Looker dashboard
- Check for misspelled/indented YAML keys so the value actually lands in cfg.Description
- If templated, ensure the template renders a non-empty string
Example fix
// before kind: looker-add-dashboard-element name: add_tile source: looker-source // after kind: looker-add-dashboard-element name: add_tile source: looker-source description: Adds a tile element to an existing Looker dashboard
Defensive patterns
Strategy: validation
Validate before calling
if cfg.Description == "" {
return errors.New("description is required for looker tools")
} Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil && strings.Contains(err.Error(), "description is required") {
// add description to the tool entry in tools.yaml and reload
return err
} Prevention
- Include a description for every tool block in tools.yaml
- Validate tools.yaml with the toolbox config schema/CLI before server start
- Watch for misspelled keys (desc/description) that leave the field empty
When it happens
Trigger: A tools.yaml entry for kind: looker-add-dashboard-element omits the description field or sets it to "" and the server starts, invoking Initialize.
Common situations: Minimal example configs copy-pasted without the description; YAML key misspelled (desc:, descrption:) leaving the field zero-valued; description removed during config cleanup; empty string after templating.
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
- invalid source for %q tool: source %q is not a compatible ty
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/b4efca0a73a05195.
Report an issue: GitHub.