googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
MCP toolbox tools require a human-readable `description` field; it is what the LLM sees in the tool manifest. `Config.Initialize` validates this eagerly and refuses to construct the tool when the description is empty.
Source
Thrown at internal/tools/looker/lookergetconnections/lookergetconnections.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)
}
params := parameters.Parameters{}
// finish tool setup
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations),
tools.Manifest{Description: cfg.Description, Parameters: params.Manifest(), AuthRequired: cfg.AuthRequired},
params,
),
}, nil
}
// validate interface
var _ tools.Tool = Tool{}
View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty `description:` to the tool entry in tools.yaml
- If constructing Config in Go, set cfg.Description before calling Initialize
- Validate the whole config with the toolbox CLI (e.g. `toolbox --tools-file tools.yaml --prebuilt` dry run) to surface all such validation errors at once
Example fix
// before
tools:
list-conns:
kind: looker-get-connections
source: my-looker
// after
tools:
list-conns:
kind: looker-get-connections
source: my-looker
description: Fetches Looker database connections. Defensive patterns
Strategy: validation
Validate before calling
if cfg.Description == "" {
return fmt.Errorf("tool %q: description must be set before Initialize", cfg.Name)
}
_ = cfg.Initialize(context.Background()) Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil && strings.Contains(err.Error(), "description is required") {
// fix the tool config entry and retry
return fmt.Errorf("config error for %s: %w", cfg.Name, err)
} Prevention
- Always include a `description:` line for every tool in tools.yaml
- Run toolbox config validation in CI before deploying
- When generating configs from templates, assert every tool has a non-empty description
When it happens
Trigger: Calling Config.Initialize on a looker-get-connections tool whose `description` field in the tool config is absent or set to "".
Common situations: Hand-edited tools.yaml where the description line was deleted; programmatically-built Config structs that leave Description zero-valued; copy-pasting a tool entry and forgetting to fill in the description.
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
- 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/efdaa30ccfd6e087.
Report an issue: GitHub.