googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Config.Initialize for the falkordb-execute-cypher tool requires a non-empty `description` before it will construct the Tool. The description is surfaced in the tool manifest for LLM clients; an empty one makes the tool invalid, so Initialize fails with this error.

Source

Thrown at internal/tools/falkordb/falkordbexecutecypher/falkordbexecutecypher.go:69

type Config struct {
	tools.ConfigBase   `yaml:",inline"`
	Type               string                 `yaml:"type" validate:"required"`
	Source             string                 `yaml:"source" validate:"required"`
	ReadOnly           bool                   `yaml:"readOnly"`
	AllowGraphOverride bool                   `yaml:"allowGraphOverride"`
	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)
	}

	cypherParameter := parameters.NewStringParameter("cypher", "The cypher to execute.")
	dryRunParameter := parameters.NewBooleanParameter(
		"dry_run",
		"If set to true, the query will be validated and its execution plan "+
			"returned without running the query. Defaults to false.", parameters.WithBooleanDefault(
			false))
	params := parameters.Parameters{cypherParameter, dryRunParameter}
	if cfg.AllowGraphOverride {
		graphParameter := parameters.NewStringParameter(
			"graph",
			"The name of the graph to query. Defaults to the source's configured graph.",
			parameters.WithStringDefault(""))
		params = append(params, graphParameter)
	}

	defaultAnnotations := tools.NewDestructiveAnnotations

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty `description` to the falkordb-execute-cypher tool entry
  2. Check the YAML block belongs to the tool and wasn't dropped by a merge
  3. Quote the description so special characters parse safely
  4. Reload the toolbox and confirm the tool registers

Example fix

// before (tools.yaml)
tools:
  exec-cypher:
    kind: falkordb-execute-cypher
    source: falkordb
// after
tools:
  exec-cypher:
    kind: falkordb-execute-cypher
    source: falkordb
    description: Executes a Cypher query with optional dry-run plan validation.
Defensive patterns

Strategy: validation

Validate before calling

if strings.TrimSpace(t.Description) == "" {
    return fmt.Errorf("tool %q (falkordb-execute-cypher) is missing description", t.Name)
}

Type guard

func validToolConfig(cfg Config) bool { return strings.TrimSpace(cfg.Description) != "" && cfg.Name != "" }

Try / catch

_, err := cfg.Initialize(ctx)
if err != nil && strings.Contains(err.Error(), "description is required") {
    return fmt.Errorf("add description for tool %s in tools.yaml", cfg.Name)
}

Prevention

When it happens

Trigger: Loading config where a `falkordb-execute-cypher` tool lacks a `description` field or has `description: ""`.

Common situations: Omitting description while copying the dry_run/cypher parameter boilerplate; merge conflicts that dropped the description line; generated configs with blank description templates.

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


AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05). Data as JSON: /api/errors/48d5a1f68eb727f7. Report an issue: GitHub.