googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
Config.Initialize in the snowflake-sql tool requires a non-empty description before the tool can be built. The description becomes the tool manifest shown to LLM clients; without it the tool would be unusable/undeclared, so Initialize fails fast with this error.
Source
Thrown at internal/tools/snowflake/snowflakesql/snowflakesql.go:70
tools.ConfigBase `yaml:",inline"`
Type string `yaml:"type" validate:"required"`
Source string `yaml:"source" validate:"required"`
Statement string `yaml:"statement" validate:"required"`
Parameters parameters.Parameters `yaml:"parameters"`
TemplateParameters parameters.Parameters `yaml:"templateParameters"`
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, paramManifest, err := parameters.ProcessParameters(cfg.TemplateParameters, cfg.Parameters)
if err != nil {
return nil, err
}
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewDestructiveAnnotations),
tools.Manifest{Description: cfg.Description, Parameters: paramManifest, AuthRequired: cfg.AuthRequired},
allParameters,
),
}, nil
}
// validate interfaceView on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a `description:` field to the snowflake-sql tool entry in your YAML config.
- If constructing Config in Go, set ConfigBase.Description before calling Initialize.
- Validate your YAML keys (indentation, singular `description`) — an empty string passes decoding and only fails in Initialize.
Example fix
// before (tools.yaml) my-tool: kind: snowflake-sql source: my-snowflake-source statement: SELECT 1 // after my-tool: kind: snowflake-sql source: my-snowflake-source description: Runs a SQL statement against Snowflake. statement: SELECT 1
Defensive patterns
Strategy: validation
Validate before calling
if cfg.Description == "" {
return fmt.Errorf("tool %q is missing required field: description", cfg.Name)
} Try / catch
if err := toolInitialize(); err != nil {
if strings.Contains(err.Error(), "description is required") {
// add the missing description to the tool config and retry
}
return err
} Prevention
- Always set `description:` for every tool in tools.yaml; add a config schema/lint check.
- Keep a template tools.yaml with description pre-filled.
- Watch for YAML typos (`descriptions:`) that decode to an empty string silently.
When it happens
Trigger: Calling Initialize on a snowflake-sql Config whose ConfigBase.Description is the empty string — typically after decoding a tools.yaml entry that omits the `description` field.
Common situations: A tools.yaml tool entry missing `description:`; programmatically constructing Config{Name: ...} without setting Description; a YAML typo like `descriptions:` that silently decodes to empty.
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/17ec6f98f77b74da.
Report an issue: GitHub.