googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
LookerGetProjectFiles.Config.Initialize validates that a non-empty description was supplied, because the description becomes the tool's LLM-facing manifest text. When Config.Description is empty, Initialize returns this error and the tool is not created. It is a YAML/config validation failure at load time.
Source
Thrown at internal/tools/looker/lookergetprojectfiles/lookergetprojectfiles.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)
}
projectIdParameter := parameters.NewStringParameter("project_id", "The id of the project containing the files")
allParameters := parameters.Parameters{projectIdParameter}
// finish tool setup
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations),
tools.Manifest{Description: cfg.Description, Parameters: allParameters.Manifest(), AuthRequired: cfg.AuthRequired},
allParameters,
),
}, nil
}
// validate interface
var _ tools.Tool = Tool{}View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a descriptive `description:` string to the looker-get-project-files tool entry in your YAML.
- Write the description from the calling agent's perspective (what the tool does, when to use it).
- Re-run the toolbox; if it still fails, check that the tool name in the error matches the entry you edited.
Example fix
// before
tools:
get-project-files:
kind: looker-get-project-files
source: my-looker
// after
tools:
get-project-files:
kind: looker-get-project-files
source: my-looker
description: Lists all files in a given Looker project Defensive patterns
Strategy: validation
Validate before calling
// Pre-load YAML and assert required tool fields
var raw map[string]map[string]any
yaml.Unmarshal(cfgBytes, &raw)
for name, t := range raw["tools"] {
if t["kind"] == "looker-get-project-files" {
desc, _ := t["description"].(string)
if desc == "" {
return fmt.Errorf("tool %q (looker-get-project-files) is missing a non-empty description", name)
}
}
} Try / catch
tool, err := toolCfg.Initialize(ctx)
if err != nil && strings.Contains(err.Error(), "description is required") {
return fmt.Errorf("config error: add a 'description' to tool %q in your YAML: %w", toolCfg.Name, err)
} Prevention
- Always include description for every tool entry; treat it as mandatory even if some kinds tolerate empty.
- Write descriptions from the agent's perspective to double as documentation.
- Lint tools.yaml in CI for empty required fields before deploying.
When it happens
Trigger: A tools.yaml entry of kind looker-get-project-files omits the `description` field (or sets it to an empty string), causing Config.Initialize to fail while the toolbox config is being loaded.
Common situations: Hand-writing tool configs and skipping description because it seems optional; templated config generation that leaves description blank; upgrading from an older config format where description was defaulted.
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
- unable to parse Timeout string as time.Duration: %s
- 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/95d65b7d9be6b159.
Report an issue: GitHub.