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 looker-delete-gitbranch tool requires a non-empty description (inherited from tools.ConfigBase). Initialize is called while parsing the tool config; an empty description means the MCP tool manifest could not be built meaningfully, so initialization fails immediately with this error.

Source

Thrown at internal/tools/looker/lookerdeletegitbranch/lookerdeletegitbranch.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"`
}

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

	projectIdParameter := parameters.NewStringParameter("project_id", "The project_id")
	branchParameter := parameters.NewStringParameter("branch", "The git branch to delete")
	params := parameters.Parameters{projectIdParameter, branchParameter}

	annotations := &tools.ToolAnnotations{}
	if cfg.Annotations != nil {
		*annotations = *cfg.Annotations
	}
	readOnlyHint := false
	destructiveHint := true
	annotations.ReadOnlyHint = &readOnlyHint
	annotations.DestructiveHint = &destructiveHint

	// finish tool setup
	return Tool{
		BaseTool: tools.NewBaseTool(

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty `description:` field to the looker-delete-gitbranch tool definition.
  2. Check the YAML key spelling is exactly `description` and it is not overridden to empty by an environment placeholder.
  3. If generating configs, validate that every tool block includes a description before loading.

Example fix

# before
tools:
  delete-branch:
    kind: looker-delete-gitbranch
    source: my-looker

# after
tools:
  delete-branch:
    kind: looker-delete-gitbranch
    source: my-looker
    description: Deletes a git branch in a Looker project
Defensive patterns

Strategy: validation

Validate before calling

// pre-flight check on decoded tool config
if cfg.Description == "" {
	return fmt.Errorf("tool %q must define a non-empty `description` field", cfg.Name)
}

Try / catch

tool, err := cfg.Initialize(ctx)
if err != nil {
	return fmt.Errorf("invalid looker-delete-gitbranch config: %w (add a `description` field)", err)
}

Prevention

When it happens

Trigger: Defining a looker-delete-gitbranch tool in the YAML (or programmatically) without a `description` field, or with `description: ""`.

Common situations: Hand-writing minimal tool configs and omitting description; templated configs where the description variable renders empty; YAML key misspelled (e.g. `desc:`) so the field decodes to zero value.

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