googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Initialize() for the looker-add-dashboard-filter tool refuses to construct the tool when the Config's Description field is empty. Tool descriptions are required so LLM clients can understand when to invoke the tool; the toolbox treats a missing description as a configuration error at startup rather than a runtime failure.

Source

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

	params := parameters.Parameters{}

	dashIdParameter := parameters.NewStringParameter("dashboard_id", "The id of the dashboard where this filter will exist")
	params = append(params, dashIdParameter)
	nameParameter := parameters.NewStringParameter("name", "The name of the Dashboard Filter")
	params = append(params, nameParameter)
	titleParameter := parameters.NewStringParameter("title", "The title of the Dashboard Filter")
	params = append(params, titleParameter)
	filterTypeParameter := parameters.NewStringParameter("filter_type", "The filter_type of the Dashboard Filter: date_filter, number_filter, string_filter, field_filter (default field_filter)", parameters.WithStringDefault("field_filter"))
	params = append(params, filterTypeParameter)
	defaultParameter := parameters.NewStringParameter("default_value", "The default_value of the Dashboard Filter (optional)", parameters.WithStringRequired(false))
	params = append(params, defaultParameter)
	modelParameter := parameters.NewStringParameter("model", "The model of a field type Dashboard Filter (required if type field)", parameters.WithStringRequired(false))
	params = append(params, modelParameter)
	exploreParameter := parameters.NewStringParameter("explore", "The explore of a field type Dashboard Filter (required if type field)", parameters.WithStringRequired(false))
	params = append(params, exploreParameter)

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty 'description' field to the tool's config block in your YAML.
  2. Verify the Config struct unmarshalling maps your YAML key correctly to the Description field.
  3. If generating configs programmatically, validate Description != "" before calling Initialize.

Example fix

// before
tools:
  add-dashboard-filter:
    kind: looker-add-dashboard-filter
    source: my-looker
// after
tools:
  add-dashboard-filter:
    kind: looker-add-dashboard-filter
    source: my-looker
    description: Add a filter to a Looker dashboard
Defensive patterns

Strategy: validation

Validate before calling

// Pre-validate your tools.yaml / config before loading
if cfg.Description == "" {
    return fmt.Errorf("tool %q needs a description", cfg.Name)
}

Try / catch

if err := tool.Init(ctx); err != nil {
    if strings.Contains(err.Error(), "description is required") {
        // fix the config and retry
    }
}

Prevention

When it happens

Trigger: Declaring a tool YAML/config with type looker-add-dashboard-filter but omitting the 'description' field (or setting it to an empty string), then loading it so Config.Initialize runs.

Common situations: Hand-written tools.yaml where the description key was forgotten; templated config generation that drops empty fields; copying a tool definition and deleting the description.

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/04692bc8feca1a8b. Report an issue: GitHub.