googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

YugabyteDB SQL tool configs require a non-empty Description; Config.Initialize fails with this error when it is empty. The description is required because it becomes part of the tool manifest consumed by LLM clients.

Source

Thrown at internal/tools/yugabytedbsql/yugabytedbsql.go:70

	tools.ConfigBase   `yaml:",inline"`
	Type               string                 `yaml:"type" validate:"required"`
	Source             string                 `yaml:"source" validate:"required"`
	Statement          string                 `yaml:"statement" validate:"required"`
	Parameters         parameters.Parameters  `yaml:"parameters"`
	TemplateParameters parameters.Parameters  `yaml:"templateParameters"`
	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)
	}

	allParameters, paramManifest, err := parameters.ProcessParameters(cfg.TemplateParameters, cfg.Parameters)
	if err != nil {
		return nil, err
	}

	return Tool{
		BaseTool: tools.NewBaseTool(
			cfg,
			tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewDestructiveAnnotations),
			tools.Manifest{Description: cfg.Description, Parameters: paramManifest, AuthRequired: cfg.AuthRequired},
			allParameters,
		),
	}, nil
}

// validate interface

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty 'description' field to the tool entry in tools.yaml
  2. Check for YAML typos/indentation that would leave Description unset
  3. When constructing Config in Go, populate Description before Initialize

Example fix

# before
tools:
  yb-sql:
    kind: yugabytedb-execute-sql
    source: my-yb
# after
tools:
  yb-sql:
    kind: yugabytedb-execute-sql
    source: my-yb
    description: Executes SQL statements against YugabyteDB
Defensive patterns

Strategy: validation

Validate before calling

if cfg.Description == "" {
    return fmt.Errorf("yugabytedb tool %q requires a description", cfg.Name)
}

Try / catch

tool, err := cfg.Initialize(ctx)
if err != nil && strings.Contains(err.Error(), "description is required") {
    // add a non-empty 'description' to the yugabytedb tool entry
}

Prevention

When it happens

Trigger: Declaring a yugabytedbsql tool (e.g. yugabytedb-execute-sql) in tools.yaml without a 'description', or calling Config.Initialize on a Config whose Description is "".

Common situations: Minimal configs omitting description; programmatic config builders with empty description variables; migrating Postgres tool configs to YugabyteDB and dropping fields.

Related errors


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