googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Config.Initialize for clickhouse-list-databases validates that every tool needs a non-empty `description`, since descriptions are exposed to LLM clients in the tool manifest. An empty description makes the tool useless to model clients, so initialization fails fast.

Source

Thrown at internal/tools/clickhouse/clickhouselistdatabases/clickhouselistdatabases.go:65

}

type Config struct {
	tools.ConfigBase `yaml:",inline"`
	Type             string                 `yaml:"type" validate:"required"`
	Source           string                 `yaml:"source" validate:"required"`
	Parameters       parameters.Parameters  `yaml:"parameters"`
	Annotations      *tools.ToolAnnotations `yaml:"annotations,omitempty"`
}

var _ tools.ToolConfig = Config{}

func (cfg Config) ToolConfigType() string {
	return listDatabasesType
}

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(nil, cfg.Parameters)
	if err != nil {
		return nil, err
	}

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

var _ tools.Tool = Tool{}

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty `description` field to the tool's YAML block.
  2. Fix key typos so the value actually lands in Config.Description.
  3. If building Config in code, set Description before calling Initialize.

Example fix

// before
source: my-clickhouse
name: list_databases
// after
source: my-clickhouse
name: list_databases
description: List all databases in the ClickHouse instance.
Defensive patterns

Strategy: validation

Validate before calling

// Go
cfg := Config{Name: "list_databases", /* ... */}
if cfg.Description == "" {
    return errors.New("clickhouse-list-databases requires a non-empty description")
}
if _, err := cfg.Initialize(context.Background()); err != nil {
    return err
}

Prevention

When it happens

Trigger: Loading a YAML tools file where a `clickhouse-list-databases` tool entry omits the `description` field or sets it to ""; constructing Config{Name: "x"} in Go and calling Initialize directly (as the unit tests do).

Common situations: Hand-written minimal tool configs; generated configs with dropped fields; YAML key typo like `descriptions:` so Description unmarshals empty.

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