googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Looker tool configs require a non-empty description because it becomes the tool's description surfaced to LLM clients via MCP. Initialize fails fast when Config.Description is empty so that an undescribed tool is never registered.

Source

Thrown at internal/tools/looker/lookerdeleteprojectfile/lookerdeleteprojectfile.go:72

}

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 id of the project containing the files")
	filePathParameter := parameters.NewStringParameter("file_path", "The path of the file within the project")
	params := parameters.Parameters{projectIdParameter, filePathParameter}

	// finish tool setup
	return Tool{
		BaseTool: tools.NewBaseTool(
			cfg,
			tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewDestructiveAnnotations),
			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 description field to the tool's YAML config
  2. Set cfg.Description before calling Initialize in code
  3. Run toolbox with --prebuilt to use validated prebuilt configs

Example fix

// before
- name: delete-project-file
  source: my-looker
// after
- name: delete-project-file
  source: my-looker
  description: Deletes a file within a Looker project
Defensive patterns

Strategy: validation

Validate before calling

if strings.TrimSpace(cfg.Description) == "" { return errors.New("looker tool config requires a description") }

Try / catch

if err := cfg.Initialize(ctx); err != nil { log.Fatalf("tool config invalid: %v", err) }

Prevention

When it happens

Trigger: Loading a tools YAML where a lookerdeleteprojectfile tool entry omits the description field (or sets it to ""), then calling Config.Initialize.

Common situations: Hand-editing tool configs and dropping the description; programmatically constructing Config{} without setting Description; copy-pasting a minimal tool block without all required fields.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05). Data as JSON: /api/errors/7219cacd29dad757. Report an issue: GitHub.