googleapis/mcp-toolbox · error

description is required for tool %q

Error message

description is required for tool %q

What it means

Config.Initialize for mindsdb-execute-sql validates that the tool has a non-empty description before building the tool. The description is what is exposed to LLM clients via the MCP manifest, so an empty one is treated as invalid configuration and tool creation fails immediately.

Source

Thrown at internal/tools/mindsdb/mindsdbexecutesql/mindsdbexecutesql.go:66

	RunSQL(context.Context, string, []any) (any, error)
}

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"`
}

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

	sqlParameter := parameters.NewStringParameter("sql", "The sql to execute.")
	params := parameters.Parameters{sqlParameter}

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

var _ tools.Tool = Tool{}

type Tool struct {

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Add a non-empty `description` field to the tool entry in tools.yaml
  2. If generating configs programmatically, validate that description is non-empty before calling Initialize
  3. Run the toolbox config load locally to catch this before deployment

Example fix

// before (tools.yaml)
execute-sql:
  kind: mindsdb-execute-sql
  source: my-mindsdb
// after
execute-sql:
  kind: mindsdb-execute-sql
  source: my-mindsdb
  description: Execute SQL statements against MindsDB.
Defensive patterns

Strategy: validation

Validate before calling

if cfg.Name != "" && cfg.Description == "" {
    return fmt.Errorf("tool %q: description must be non-empty", cfg.Name)
}

Prevention

When it happens

Trigger: Declaring a tool with kind `mindsdb-execute-sql` in tools.yaml where the `description` field is missing or set to an empty string, then loading the config (Initialize is called during toolbox startup).

Common situations: Hand-writing a tools.yaml and omitting description; templating tools programmatically and leaving the description field empty; deleting a description during a config cleanup.

Related errors


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