googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Configuration-time validation in Initialize: the cloudstorage-get-bucket-iam-policy tool entry in tools.yaml omits its description, which is required for the tool manifest shown to the LLM.

Source

Thrown at internal/tools/cloudstorage/cloudstoragegetbucketiampolicy/cloudstoragegetbucketiampolicy.go:68

}

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

	allParameters := parameters.Parameters{}
	if cfg.Bucket == nil {
		allParameters = append(allParameters, parameters.NewStringParameter(bucketKey, "Name of the Cloud Storage bucket whose IAM policy should be returned."))
	}

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

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty description field to the tool config
  2. Ensure description is indented inside the tool mapping
  3. Set Description in Go before calling Initialize

Example fix

// before
tools:
  get-bucket-iam-policy:
    kind: cloudstorage-get-bucket-iam-policy
    source: my-gcs
// after
tools:
  get-bucket-iam-policy:
    kind: cloudstorage-get-bucket-iam-policy
    source: my-gcs
    description: Get the IAM policy of a Cloud Storage bucket
Defensive patterns

Strategy: validation

Validate before calling

if cfg.Description == "" {
    return errors.New("get-bucket-iam-policy: description is required")
}

Try / catch

if err := startToolbox(); err != nil {
    if strings.Contains(err.Error(), "description is required") {
        // add description to the tool config
    }
    log.Fatal(err)
}

Prevention

When it happens

Trigger: tools.yaml declares a cloudstorage-get-bucket-iam-policy tool without a description or with description: "".

Common situations: Omitting description when adding IAM tools to a config; YAML nesting mistakes; programmatic config building without setting Description.

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