googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Config.Initialize for cloudstorage-delete-object requires a non-empty description field. Descriptions are surfaced to the LLM as the tool's documentation in the MCP manifest, so an empty one is treated as a misconfiguration and initialization fails.

Source

Thrown at internal/tools/cloudstorage/cloudstoragedeleteobject/cloudstoragedeleteobject.go:71

}

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"`
	Bucket           *string                `yaml:"bucket,omitempty"`
}

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)
	}
	if cfg.Bucket != nil && *cfg.Bucket == "" {
		return nil, fmt.Errorf("bucket cannot be empty for tool %q", cfg.Name)
	}

	objectParam := parameters.NewStringParameter(objectKey, "Full object name (path) within the bucket, e.g. 'path/to/file.txt'.")
	allParameters := parameters.Parameters{}
	if cfg.Bucket == nil {
		allParameters = append(allParameters, parameters.NewStringParameter(bucketKey, "Name of the Cloud Storage bucket containing the object to delete."))
	}
	allParameters = append(allParameters, objectParam)

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

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty description field to the tool entry in tools.yaml
  2. Check YAML indentation so description lands inside the tool config, not a sibling key
  3. If constructing Config in Go, set cfg.Description before calling Initialize

Example fix

// before
tools:
  delete-object:
    kind: cloudstorage-delete-object
    source: my-gcs
// after
tools:
  delete-object:
    kind: cloudstorage-delete-object
    source: my-gcs
    description: Delete an object from a Cloud Storage bucket
Defensive patterns

Strategy: validation

Validate before calling

if cfg.Description == "" {
    return fmt.Errorf("tool %q: description is required", cfg.Name)
}

Try / catch

if err := startToolbox(); err != nil {
    if strings.Contains(err.Error(), "description is required") {
        // fix tools.yaml and retry
    }
    log.Fatal(err)
}

Prevention

When it happens

Trigger: Declaring a cloudstorage-delete-object tool in tools.yaml without the description field, or with description: "".

Common situations: Minimal configs copied from examples that omit description; YAML indentation mistakes placing description under the wrong key; programmatic Config construction leaving Description 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/b4513b4312aca6e3. Report an issue: GitHub.