googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Initialize refuses to construct the bigquery-analyze-contribution tool because cfg.Description is empty — this tool has no sensible default description, and an LLM-facing tool cannot be exposed without one.

Source

Thrown at internal/tools/bigquery/bigqueryanalyzecontribution/bigqueryanalyzecontribution.go:79

}

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 is the static skeleton (no source at init ⇒ no allowed-dataset restriction).
	// Manifest/GetParameters re-resolve against the source lazily.
	params := buildParams(nil)
	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
var _ tools.Tool = Tool{}

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a `description` field to the tool entry in tools.yaml
  2. Check YAML indentation so description is parsed
  3. Ensure the description is non-empty
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/tools/bigquery/bigqueryanalyzecontribution/bigqueryanalyzecontribution.go:79 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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