googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
The bigquery-execute-sql tool's Config.Initialize returns this error when the tool's Description field is empty. Descriptions are required because they are surfaced to the LLM as the tool's prompt-level documentation. The check runs at configuration/initialization time, before any request is served.
Source
Thrown at internal/tools/bigquery/bigqueryexecutesql/bigqueryexecutesql.go:80
}
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)
}
params, err := buildParams("", nil)
if err != nil {
return nil, err
}
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 interface
var _ tools.Tool = Tool{}View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty description field to the bigquery-execute-sql tool definition in your config.
- Verify YAML indentation so description is a sibling of name/kind, not nested or swallowed.
- If building Config in Go, set cfg.Description before calling Initialize.
Example fix
// before (tools.yaml)
tools:
execute-sql:
kind: bigquery-execute-sql
source: my-bigquery-source
// after
tools:
execute-sql:
kind: bigquery-execute-sql
source: my-bigquery-source
description: Runs BigQuery SQL statements against the configured datasets. Defensive patterns
Strategy: validation
Validate before calling
if cfg.Description == "" {
return fmt.Errorf("tool %q: description is required", cfg.Name)
}
if err := cfg.Initialize(context.Background()); err != nil { /* handle before serving */ } Try / catch
tool, err := cfg.Initialize(ctx)
if err != nil {
log.Fatalf("invalid bigquery-execute-sql config: %v", err)
} Prevention
- Never leave description empty in tool definitions; treat it as a required field in your config linter.
- Run server startup config validation in CI to catch missing fields early.
- Watch YAML indentation when hand-editing tools.yaml.
- Use schema validation (yaml lint against the toolbox schema) before deploy.
When it happens
Trigger: Declaring a bigquery-execute-sql tool in the YAML config (or constructing Config programmatically) without setting the description field, then calling Initialize.
Common situations: Hand-written tools.yaml with a missing or empty description key; YAML indentation mistakes that drop the description field; programmatic tool construction where Description was left at its zero value.
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
- expected allowedDataset to have at least 2 parts (project.da
- invalid ipType %s
- password is provided without a username. Please provide both
- description is required for tool %q
- invalid source for %q tool: source %q is not a compatible ty
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/cbf34a60ec4bc4f8.
Report an issue: GitHub.