googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

looker-get-dashboard's Config.Initialize rejects configs with an empty description because tool descriptions are required metadata consumed by the LLM via the MCP manifest. An empty description means the tool definition is incomplete, so initialization fails instead of producing a tool with no usable documentation.

Source

Thrown at internal/tools/looker/lookergetdashboard/lookergetdashboard.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)
	}

	dashboardIdParameter := parameters.NewStringParameter("dashboard_id", "The id of the dashboard to retrieve.")
	params := parameters.Parameters{
		dashboardIdParameter,
	}

	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
}

// validate interface

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty description to the looker-get-dashboard tool entry.
  2. Ensure templated/variable descriptions actually resolve to non-empty values at load time.
  3. Pre-validate configs (schema or startup dry-run) to catch empty required fields.
  4. Copy the documented looker-get-dashboard example config including its description.

Example fix

# before
tools:
  get-dashboard:
    kind: looker-get-dashboard
    source: my-looker
    description: ""
# after
tools:
  get-dashboard:
    kind: looker-get-dashboard
    source: my-looker
    description: Retrieves a Looker dashboard by its ID.
Defensive patterns

Strategy: validation

Validate before calling

// pre-load validation of the YAML config
for name, tool := range toolsCfg {
    if tool.Description == "" {
        return fmt.Errorf("tool %q: description is required", name)
    }
}

Type guard

func validDashboardToolConfig(c lookergetdashboard.Config) bool {
    return c.Name != "" && c.Description != ""
}

Try / catch

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

Prevention

When it happens

Trigger: Calling Initialize at startup with a looker-get-dashboard tool config whose description key is missing or set to an empty string (including when templating resolves to empty).

Common situations: Hand-written tools.yaml missing the description; environment-variable/param substitution yielding an empty string; trimmed-down example configs; automation that generates tool blocks without descriptions.

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/898a355daba60ecf. Report an issue: GitHub.