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 cloudloggingadmin-list-log-names tool validates that a non-empty description was provided, since tool descriptions are surfaced to the LLM to decide when to use the tool. An empty description makes the config invalid and initialization fails immediately.

Source

Thrown at internal/tools/cloudloggingadmin/cloudloggingadminlistlognames/cloudloggingadminlistlognames.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)
	}

	limitDescription := fmt.Sprintf("Maximum number of log entries to return. Default: %d.", defaultLimit)
	params := parameters.Parameters{
		parameters.NewIntParameter("limit", limitDescription, parameters.WithIntRequired(false)),
	}

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

// validate interface

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty `description` field to the tool definition in the config.
  2. Check the YAML indentation so `description` is nested under the tool, not a sibling.
  3. Verify the key spelling is exactly `description` (singular).
  4. Re-run the toolbox; the error names the tool so fix that specific entry.

Example fix

// before
tools:
  list-log-names:
    kind: cloudloggingadmin-list-log-names
    source: my-logging
// after
tools:
  list-log-names:
    kind: cloudloggingadmin-list-log-names
    source: my-logging
    description: List Cloud Logging log names for a project.
Defensive patterns

Strategy: validation

Validate before calling

// shell check before applying a toolbox config
yq '.tools[] | select(.kind == "cloudloggingadmin-list-log-names") | select(.description == null or .description == "") | error("missing description")' config.yaml

Prevention

When it happens

Trigger: Defining a cloudloggingadmin-list-log-names tool in the YAML config without a `description` field, or with `description: ""`.

Common situations: Minimal example configs copied without the description key; programmatically generated tool configs where description defaulted to empty; YAML key typo (`descriptions:` or wrong indentation) leaving the field unset.

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