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-deleteagent tool validates that the Config carries a non-empty Description. The description populates the tool's MCP manifest for LLM clients; an empty description means the tool definition is invalid and initialization returns this error.
Source
Thrown at internal/tools/looker/lookerdeleteagent/lookerdeleteagent.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)
}
agentIdParameter := parameters.NewStringParameter("agent_id", "The ID of the agent.", parameters.WithStringDefault(""))
params := parameters.Parameters{agentIdParameter}
annotations := &tools.ToolAnnotations{}
if cfg.Annotations != nil {
*annotations = *cfg.Annotations
}
readOnlyHint := false
destructiveHint := true
annotations.ReadOnlyHint = &readOnlyHint
annotations.DestructiveHint = &destructiveHint
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
annotations,View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty description field to the looker-deleteagent tool entry
- Check the rendered config to ensure the description didn't resolve to empty
- Set Description when building lookerdeleteagent.Config programmatically
Example fix
# before
tools:
delete-agent:
kind: looker-delete-agent
source: my-looker
# after
tools:
delete-agent:
kind: looker-delete-agent
source: my-looker
description: Deletes a Looker agent by ID Defensive patterns
Strategy: validation
Validate before calling
if strings.TrimSpace(cfg.Description) == "" {
return fmt.Errorf("looker-delete-agent requires a description")
} Type guard
func validDescription(cfg lookerdeleteagent.Config) bool {
return strings.TrimSpace(cfg.Description) != ""
} Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil {
if strings.Contains(err.Error(), "description is required") {
// populate cfg.Description and retry
}
return err
} Prevention
- Always set description in tool YAML entries
- Fail fast with a config linter on empty descriptions
- Give template variables for description non-empty defaults
- Verify rendered configs in CI before deployment
When it happens
Trigger: A looker-deleteagent entry in the tools YAML lacks description or has an empty value when Initialize runs during server startup or config parsing.
Common situations: Hand-written config missing the description key; templated config where the variable was empty; bulk-edited YAML where descriptions were dropped.
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/23ad19467aadb890.
Report an issue: GitHub.