googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

The snowflake-execute-sql tool's Config.Initialize returns this error when the tool's `description` field is empty. Toolbox mandates a description for every tool because it is exposed to MCP clients in the tool manifest; initialization of the tool fails and it will not be registered until a non-empty description is supplied. The message includes the tool's configured name for quick identification in tools.yaml.

Source

Thrown at internal/tools/snowflake/snowflakeexecutesql/snowflakeexecutesql.go:67

}

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)
	}

	sqlParameter := parameters.NewStringParameter("sql", "The sql 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
}

// validate interface
var _ tools.Tool = Tool{}

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty `description:` to the snowflake-execute-sql tool definition.
  2. Correct YAML indentation so description belongs to the tool mapping.
  3. If the description is injected via env/templating, confirm the variable is set before launching Toolbox.

Example fix

# before
tools:
  sf-exec:
    kind: snowflake-execute-sql
    source: snowflake-src
# after
tools:
  sf-exec:
    kind: snowflake-execute-sql
    source: snowflake-src
    description: Execute a SQL statement against Snowflake and return the results.
Defensive patterns

Strategy: validation

Validate before calling

tools:
  sf-exec:
    kind: snowflake-execute-sql
    source: snowflake-src
    description: "Execute SQL on Snowflake"  # must be non-empty

Type guard

func hasDescription(name, desc string) error {
    if desc == "" {
        return fmt.Errorf("tool %q is missing a description", name)
    }
    return nil
}

Try / catch

if err := toolbox.Start(ctx); err != nil {
    if strings.Contains(err.Error(), "description is required for tool") {
        log.Fatalf("add missing description for the named tool: %v", err)
    }
    log.Fatalf("startup failed: %v", err)
}

Prevention

When it happens

Trigger: A `snowflake-execute-sql` tool entry in tools.yaml lacking a `description` field or containing `description: ""` when the config is loaded and Initialize runs.

Common situations: Writing minimal snowflake examples that omit description; environment-variable interpolation yielding an empty string; YAML nesting mistakes placing description outside the tool's mapping.

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/f29c103ffde9adce. Report an issue: GitHub.