googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Config.Initialize validates that every tool has a non-empty description before building the tool. Descriptions are required because they become the MCP tool metadata that LLM clients rely on. An empty string fails fast at config-load time rather than producing an undescribable tool.

Source

Thrown at internal/tools/firestore/firestoregetdocuments/firestoregetdocuments.go:69

}

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

	documentPathsParameter := parameters.NewArrayParameter(documentPathsKey, "Array of relative document paths to retrieve from Firestore (e.g., 'users/userId' or 'users/userId/posts/postId'). Note: These are relative paths, NOT absolute paths like 'projects/{project_id}/databases/{database_id}/documents/...'", parameters.NewStringParameter("item", "Relative document path"))
	params := parameters.Parameters{documentPathsParameter}

	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 non-empty `description:` field to the firestore-get-documents tool config.
  2. If using environment substitution, confirm the variable (e.g., ${TOOL_DESCRIPTION}) is set and non-empty.

Example fix

// before
tools:
  get_docs:
    kind: firestore-get-documents
    source: my-firestore
// after
tools:
  get_docs:
    kind: firestore-get-documents
    source: my-firestore
    description: Retrieve documents from Firestore by relative paths
Defensive patterns

Strategy: validation

Validate before calling

for name, t := range cfg.Tools {
	if t.Kind == "firestore-get-documents" && strings.TrimSpace(t.Description) == "" {
		return fmt.Errorf("tool %q: description is required", name)
	}
}

Try / catch

tool, err := cfg.Initialize(ctx)
if err != nil {
	// missing/empty description
	log.Printf("tool config incomplete: %v", err)
	return err
}

Prevention

When it happens

Trigger: Loading a YAML/tool config where a firestore-get-documents tool declares no `description:` field (or sets it to "").

Common situations: Hand-written tool configs that omit the description key; templated configs where an env-var interpolation for the description resolved to empty.

Related errors


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