googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
Config.Initialize for looker-delete-projectdirectory rejects configs whose description (from the embedded tools.ConfigBase) is empty. A description is mandatory to build the MCP tool manifest, so Initialize fails fast with this error when parsing the tool config.
Source
Thrown at internal/tools/looker/lookerdeleteprojectdirectory/lookerdeleteprojectdirectory.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)
}
projectIdParameter := parameters.NewStringParameter("project_id", "The id of the project")
directoryPathParameter := parameters.NewStringParameter("directory_path", "The path to delete in the project")
params := parameters.Parameters{projectIdParameter, directoryPathParameter}
// finish tool setup
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewDestructiveAnnotations),
tools.Manifest{Description: cfg.Description, Parameters: params.Manifest(), AuthRequired: cfg.AuthRequired},
params,
),
}, nil
}
// validate interfaceView on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty `description:` to the looker-delete-projectdirectory tool definition.
- Verify the key is spelled `description` and resolves to non-empty (check env substitutions).
- Lint generated configs to require a description per tool before server startup.
Example fix
# before
tools:
delete-dir:
kind: looker-delete-projectdirectory
source: my-looker
# after
tools:
delete-dir:
kind: looker-delete-projectdirectory
source: my-looker
description: Deletes a file or directory from a Looker project Defensive patterns
Strategy: validation
Validate before calling
// pre-flight check on decoded tool config
if cfg.Description == "" {
return fmt.Errorf("tool %q must define a non-empty `description` field", cfg.Name)
} Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil {
return fmt.Errorf("invalid looker-delete-projectdirectory config: %w (add a `description` field)", err)
} Prevention
- Always ship a `description:` line with each looker-delete-projectdirectory tool.
- Lint YAML configs (schema or CI check) to reject tools missing description.
- Ensure env-substituted descriptions do not expand to empty strings.
- Spell the key exactly as `description`.
When it happens
Trigger: A looker-delete-projectdirectory tool block in the YAML lacking the `description` key or having it set to an empty string (including an unset env placeholder).
Common situations: Minimal hand-written configs omitting description; templating rendering an empty description; misspelled YAML key like `descriptions:`.
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
- description is required for tool %q
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/b8b69d2ed0ba3257.
Report an issue: GitHub.