googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
This error is thrown by the clickhouseexecutesql tool's Config.Initialize when the tool config's Description is empty. A non-empty description is required for the MCP tool manifest, so the tool fails to initialize and is excluded from the server.
Source
Thrown at internal/tools/clickhouse/clickhouseexecutesql/clickhouseexecutesql.go:64
RunSQL(context.Context, string, parameters.ParamValues) (any, error)
}
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"`
}
var _ tools.ToolConfig = Config{}
func (cfg Config) ToolConfigType() string {
return executeSQLType
}
func (cfg Config) Initialize(context.Context) (tools.Tool, error) {
if cfg.Description == "" {
return nil, fmt.Errorf("description is required for tool %q", cfg.Name)
}
sqlParameter := parameters.NewStringParameter("sql", "The SQL statement to execute.")
params := parameters.Parameters{sqlParameter}
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
}
var _ tools.Tool = Tool{}
type Tool struct {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty description field to the clickhouse-execute-sql tool in tools.yaml
- Ensure any env/template substitution for description produces a non-empty string
- Correct YAML nesting so description belongs to the tool
- Restart the server and verify the tool registers
Example fix
// before (tools.yaml)
tools:
clickhouse-sql:
kind: clickhouse-execute-sql
source: my-clickhouse
// after
tools:
clickhouse-sql:
kind: clickhouse-execute-sql
source: my-clickhouse
description: Executes a SQL statement against ClickHouse. Defensive patterns
Strategy: validation
Validate before calling
// Validate before constructing the tool
cfg := clickhouseexecutesql.Config{Name: "clickhouse-sql", Source: "my-clickhouse"}
if strings.TrimSpace(cfg.Description) == "" {
return fmt.Errorf("tool %q requires a non-empty description", cfg.Name)
}
// Or lint the YAML: tools["clickhouse-sql"].description must be present and non-empty Type guard
func hasDescription(name, desc string) bool {
return strings.TrimSpace(desc) != ""
} Prevention
- Always set description for clickhouse-execute-sql tools
- Lint tools.yaml in CI for required non-empty fields
- Beware empty env substitutions for description values
- Run the toolbox locally to confirm all tools initialize before deploy
When it happens
Trigger: Calling Initialize on a clickhouseexecutesql Config with Description == "" — e.g. a tools.yaml entry of kind clickhouse-execute-sql missing the description key or with an empty value after expansion.
Common situations: Hand-written tools.yaml without description; templated description variables resolving to empty; YAML indentation placing description outside the tool block; copied snippets omitting the field.
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/5c784190faab3377.
Report an issue: GitHub.