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 lookerlistagents tool validates that a non-empty description was provided. The description becomes the tool's documentation surfaced to the LLM client, so a tool without one is rejected at configuration load time with this error naming the tool. This is a config-time validation failure — the server fails before any request is served.
Source
Thrown at internal/tools/looker/lookerlistagents/lookerlistagents.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)
}
allParameters := parameters.Parameters{}
annotations := &tools.ToolAnnotations{}
if cfg.Annotations != nil {
*annotations = *cfg.Annotations
}
readOnlyHint := true
annotations.ReadOnlyHint = &readOnlyHint
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
annotations,
tools.Manifest{Description: cfg.Description, Parameters: allParameters.Manifest(), AuthRequired: cfg.AuthRequired},
allParameters,
),View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty description field to the looker-list-agents tool in the config YAML.
- If using env/template substitution, verify the substituted value is not empty.
- Restart/reload the server and confirm the tool registers without error.
Example fix
// before (tools.yaml)
tools:
list-agents:
kind: looker-list-agents
source: looker-prod
// after
tools:
list-agents:
kind: looker-list-agents
source: looker-prod
description: List Looker agents available to the authenticated user. Defensive patterns
Strategy: validation
Validate before calling
// before applying the config
for name, tool := range cfg.Tools {
if tool.Kind == "looker-list-agents" && strings.TrimSpace(tool.Description) == "" {
return fmt.Errorf("tool %q is missing required description", name)
}
} Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil && strings.Contains(err.Error(), "description is required") {
return fmt.Errorf("config error in tools.yaml: %w", err)
} Prevention
- Treat description as a mandatory field in all tool templates/snippets.
- Run yaml schema validation (with required fields) in CI before deploying configs.
- After env/template substitution, assert no interpolated field is empty.
- Lint tools.yaml so every tool entry includes kind, source, and description.
When it happens
Trigger: A tools.yaml defines a looker-list-agents tool without the description field (or sets it to an empty string), and the server calls cfg.Initialize while building the tool registry.
Common situations: Hand-writing YAML and omitting description; templating that emits an empty value; deleting a description during cleanup; environment substitution that resolves description to ""; a copy of another tool's config with the description accidentally removed.
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/6f60a5b0482daa1b.
Report an issue: GitHub.