googleapis/mcp-toolbox · error
description is required for tool %q
Error message
description is required for tool %q
What it means
The redis tool's Initialize returns this error when the tool's `description` field is empty in tools.yaml. Every tool requires a human-readable description because it is surfaced to the LLM as the tool's manifest description, letting the model decide when to invoke the tool.
Source
Thrown at internal/tools/redis/redis.go:68
type Config struct {
tools.ConfigBase `yaml:",inline"`
Type string `yaml:"type" validate:"required"`
Source string `yaml:"source" validate:"required"`
Commands [][]string `yaml:"commands" validate:"required"`
Parameters parameters.Parameters `yaml:"parameters"`
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)
}
return Tool{
BaseTool: tools.NewBaseTool(
cfg,
tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewDestructiveAnnotations),
tools.Manifest{Description: cfg.Description, Parameters: cfg.Parameters.Manifest(), AuthRequired: cfg.AuthRequired},
cfg.Parameters,
),
}, nil
}
// validate interface
var _ tools.Tool = Tool{}
type Tool struct {
tools.BaseTool[Config]
}View on GitHub (pinned to 8cc6e09de2)
Solutions
- Add a non-empty `description:` field to the redis tool entry in tools.yaml
- Check YAML indentation so `description` is a sibling of `kind`, `source`, and `commands`
- Validate the config with the toolbox binary before deploying
Example fix
# before my-redis-tool: kind: redis source: redis-src commands: [["PING"]] # after my-redis-tool: kind: redis source: redis-src description: Runs the given Redis commands and returns the results. commands: [["PING"]]
Defensive patterns
Strategy: validation
Validate before calling
// pre-validate the redis tool entry before handing it to the toolbox
var check struct {
Description string `yaml:"description"`
}
if err := yaml.Unmarshal(rawToolYAML, &check); err != nil || check.Description == "" {
return fmt.Errorf("redis tool %q: description is required and must be non-empty", toolName)
} Try / catch
if err := server.Start(ctx); err != nil {
if strings.Contains(err.Error(), "description is required") {
log.Fatalf("config error: every tool needs a non-empty description; failing entry: %v", err)
}
return err
} Prevention
- Always include a meaningful `description:` for every redis tool entry
- Use prebuilt redis tool configs as templates that already contain descriptions
- Run `toolbox --tools-file tools.yaml` as a CI check before deploy
- Check YAML indentation so `description` is a top-level tool field
When it happens
Trigger: Calling Initialize during server startup for a `kind: redis` tool whose YAML entry omits the `description:` field or sets it to an empty string.
Common situations: Hand-writing a redis tool entry and forgetting the description; config generators emitting empty descriptions; YAML indentation placing `description` under the wrong key so it never binds.
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/ccf561a2915cb843.
Report an issue: GitHub.