googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Config.Initialize for the cloudloggingadmin-list-resource-types tool requires a non-empty 'description' because the tool manifest surfaced to MCP clients is built from it. When the YAML tool entry omits 'description', Initialize fails fast with this error before any server starts.

Source

Thrown at internal/tools/cloudloggingadmin/cloudloggingadminlistresourcetypes/cloudloggingadminlistresourcetypes.go:65

}

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 for this tool
	var params parameters.Parameters

	return Tool{
		BaseTool: tools.NewBaseTool(
			cfg,
			tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations),
			tools.Manifest{Description: cfg.Description, 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 entry in tools.yaml.
  2. Verify the description is indented under the correct tool key, not a sibling mapping.
  3. Re-run config parsing; the error names the offending tool via cfg.Name so check that exact entry.

Example fix

// before (tools.yaml)
  list-resource-types:
    kind: cloud-logging-admin-list-resource-types
    source: my-logging-source
// after
  list-resource-types:
    kind: cloud-logging-admin-list-resource-types
    source: my-logging-source
    description: Lists the Cloud Logging resource types available in the project.
Defensive patterns

Strategy: validation

Validate before calling

// Go: validate tool configs before Initialize
cfgs := map[string]Config{...}
for name, cfg := range cfgs {
    if cfg.Description == "" {
        return fmt.Errorf("tool %q: description is required", name)
    }
}

Try / catch

tool, err := cfg.Initialize(ctx)
if err != nil {
    if strings.Contains(err.Error(), "description is required") {
        log.Fatalf("fix tools.yaml: %v", err)
    }
    return err
}

Prevention

When it happens

Trigger: Parsing and initializing a tools.yaml where a tool of kind cloudloggingadmin-list-resource-types has no 'description' field, or has it set to an empty string.

Common situations: Hand-authoring a minimal tools.yaml and forgetting the description; a templating/scripted generator emitting empty description; YAML indentation mistakes nesting description under the wrong key so it unmarshals to "".

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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