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 is published to MCP clients as the tool's description. Initialize validates this up front and fails when Config.Description is empty so undescribed tools never get registered.

Source

Thrown at internal/tools/looker/lookerdevmode/lookerdevmode.go:70

	GetLookerSDK(context.Context, string) (*v4.LookerSDK, error)
}

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"`
}

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

	devModeParameter := parameters.NewBooleanParameter("devMode", "Whether to set Dev Mode.", parameters.WithBooleanDefault(true))
	params := parameters.Parameters{devModeParameter}

	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
}

var _ tools.Tool = Tool{}

type Tool struct {

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a description to the lookerdevmode tool config
  2. Set Description programmatically before Initialize
  3. Validate YAML against the tool's schema before loading

Example fix

// before
- name: set-dev-mode
  source: my-looker
// after
- name: set-dev-mode
  source: my-looker
  description: Toggles Looker Dev Mode
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 { return fmt.Errorf("invalid tool config: %w", err) }

Prevention

When it happens

Trigger: A lookerdevmode tool entry in the tools YAML missing the description field, then Initialize is called during config load.

Common situations: Hand-written configs omitting description; building Config structs in Go tests without Description; minimal copy-pasted tool definitions.

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