googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Config.Initialize for firestore-list-collections enforces a non-empty description. Because descriptions feed the MCP tool manifest used by LLM clients, an empty value is rejected at initialization time.

Source

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

	emptyString := ""
	parentPathParameter := parameters.NewStringParameter(parentPathKey, "Relative parent document path to list subcollections from (e.g., 'users/userId'). If not provided, lists root collections. Note: This is a relative path, NOT an absolute path like 'projects/{project_id}/databases/{database_id}/documents/...'", parameters.WithStringDefault(emptyString))
	params := parameters.Parameters{parentPathParameter}

	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 tool's YAML entry.
  2. If the description comes from a template/env var, verify it is populated.

Example fix

// before
  list_collections:
    kind: firestore-list-collections
    source: my-fs
// after
  list_collections:
    kind: firestore-list-collections
    source: my-fs
    description: List Firestore collections under a parent document path
Defensive patterns

Strategy: validation

Validate before calling

if t.Kind == "firestore-list-collections" && strings.TrimSpace(t.Description) == "" {
	return fmt.Errorf("tool %q: description must be set", name)
}

Try / catch

tool, err := cfg.Initialize(ctx)
if err != nil {
	// description missing/empty
	return fmt.Errorf("failed to init tool %q: %w", name, err)
}

Prevention

When it happens

Trigger: Loading a firestore-list-collections tool config whose `description:` key is absent or empty.

Common situations: Minimal hand-rolled configs omitting description; generated configs where the description placeholder was never filled.

Related errors


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