googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
looker-get-project-file Config.Initialize requires a non-empty description. Because the description is published in the MCP manifest consumed by LLM clients, an empty description makes the tool config invalid and initialization aborts with this error.
Source
Thrown at internal/tools/looker/lookergetprojectfile/lookergetprojectfile.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 containing the files")
filePathParameter := parameters.NewStringParameter("file_path", "The path of the file within the project")
allParameters := parameters.Parameters{projectIdParameter, filePathParameter}
// 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 interfaceView on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a descriptive `description` to the tool entry in tools.yaml.
- Verify indentation so description is a child of the tool.
- Set Description programmatically before calling Initialize.
- Run `toolbox validate` to catch missing descriptions pre-deploy.
Example fix
// before
get-project-file:
kind: looker-get-project-file
source: my-looker
// after
get-project-file:
kind: looker-get-project-file
source: my-looker
description: Fetches the contents of a file within a Looker project. Defensive patterns
Strategy: validation
Validate before calling
if strings.TrimSpace(cfg.Description) == "" {
return errors.New("tool 'get-project-file': description is required")
} Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil {
log.Fatalf("invalid looker-get-project-file config: %v", err)
} Prevention
- Always include a description for looker-get-project-file entries.
- Use `toolbox validate` pre-deploy to catch empty fields.
- Watch YAML indentation when adding tool fields.
- Reject blank description strings in config generators.
When it happens
Trigger: tools.yaml declares a looker-get-project-file tool without `description`, or Go code builds the Config with an empty Description and calls Initialize.
Common situations: Missing YAML field; wrong indentation placing description outside the tool block; templating leaving the field blank.
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/9b92704040fbc4d9.
Report an issue: GitHub.