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-get-rules rejects configs with an empty description. The description is required metadata for the tool's MCP manifest, so Initialize fails immediately when cfg.Description is "".

Source

Thrown at internal/tools/firestore/firestoregetrules/firestoregetrules.go:67

}

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

	// No parameters needed for this tool
	params := parameters.Parameters{}

	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:` to the firestore-get-rules tool config.
  2. Check env-var/templated values feeding the description resolve to a non-empty string.

Example fix

// before
  get_rules:
    kind: firestore-get-rules
    source: my-fs
// after
  get_rules:
    kind: firestore-get-rules
    source: my-fs
    description: Fetch the current Firestore security rules
Defensive patterns

Strategy: validation

Validate before calling

if strings.TrimSpace(cfg.Description) == "" {
	return errors.New("firestore-get-rules tool requires a non-empty description")
}

Try / catch

tool, err := cfg.Initialize(ctx)
if err != nil {
	log.Printf("invalid tool config: %v", err)
	return err
}

Prevention

When it happens

Trigger: A tool config of kind firestore-get-rules without a `description:` field or with an empty one.

Common situations: Omitting description because the tool takes no parameters and was assumed metadata-free; YAML templating that left the field blank.

Related errors


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