googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

The trino-sql tool requires a non-empty `description` in its config; Config.Initialize returns this error when cfg.Description is empty. Like all tools, the description is published in the manifest for LLM clients.

Source

Thrown at internal/tools/trino/trinosql/trinosql.go:70

	tools.ConfigBase   `yaml:",inline"`
	Type               string                 `yaml:"type" validate:"required"`
	Source             string                 `yaml:"source" validate:"required"`
	Statement          string                 `yaml:"statement" validate:"required"`
	Parameters         parameters.Parameters  `yaml:"parameters"`
	TemplateParameters parameters.Parameters  `yaml:"templateParameters"`
	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)
	}

	allParameters, paramManifest, err := parameters.ProcessParameters(cfg.TemplateParameters, cfg.Parameters)
	if err != nil {
		return nil, fmt.Errorf("unable to process parameters: %w", err)
	}

	return Tool{
		BaseTool: tools.NewBaseTool(
			cfg,
			tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewDestructiveAnnotations),
			tools.Manifest{Description: cfg.Description, Parameters: paramManifest, AuthRequired: cfg.AuthRequired},
			allParameters,
		),
	}, nil
}

// validate interface

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a `description` field to the trino-sql tool config with a meaningful non-empty string
  2. Fix YAML indentation so `description` belongs to the tool entry
  3. Replace any empty-string description with real text

Example fix

// before (tools.yaml)
trino_query:
  kind: trino-sql
  source: my-trino
// after
trino_query:
  kind: trino-sql
  source: my-trino
  description: Executes a parameterized SQL statement against Trino.
Defensive patterns

Strategy: validation

Validate before calling

if cfg["description"] == "" || cfg["description"] == nil {
    return errors.New("trino-sql tool: description is required")
}

Try / catch

tool, err := cfg.Initialize(ctx)
if err != nil {
    if strings.Contains(err.Error(), "description is required") {
        return fmt.Errorf("add description for tool %q", cfg.Name)
    }
    return err
}

Prevention

When it happens

Trigger: Defining a trino-sql tool in the YAML (or building its Config directly) without a `description` field or with an empty string, then initializing it.

Common situations: Omitting description in tools.yaml; empty string value; YAML nesting mistake placing description outside the tool block; templated configs missing the field.

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/2c18ee68f4eb1902. Report an issue: GitHub.