googleapis/mcp-toolbox · error

unable to process parameters: %w

Error message

unable to process parameters: %w

What it means

This error wraps a failure from parameters.ProcessParameters, which merges and validates the tool's TemplateParameters and Parameters declarations when the ScyllaDB cql tool is initialized. It is thrown during Config.Initialize, i.e. at server/config startup, before any query runs. The wrapped cause (e.g. duplicate parameter names, invalid type declarations, missing fields) is appended after the colon.

Source

Thrown at internal/tools/scylladb/scyllacql/scyllacql.go:72

func newConfig(ctx context.Context, name string, decoder *yaml.Decoder) (tools.ToolConfig, error) {
	actual := Config{ConfigBase: tools.ConfigBase{Name: name}}
	if err := decoder.DecodeContext(ctx, &actual); err != nil {
		return nil, err
	}
	return actual, nil
}

// ToolConfigType implements tools.ToolConfig.
func (cfg Config) ToolConfigType() string {
	return resourceType
}

// Initialize implements tools.ToolConfig.
func (cfg Config) Initialize(context.Context) (tools.Tool, error) {
	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
}

var _ tools.Tool = Tool{}

type Tool struct {
	tools.BaseTool[Config]
}

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Read the wrapped cause after 'unable to process parameters:' in the message to identify the exact parameter problem
  2. Check the scyllacql tool config YAML for duplicate parameter names between parameters and templateParameters
  3. Fix invalid parameter type declarations (use supported types like string, integer, boolean, array)
  4. Run the minimal repro with the corrected YAML and restart the server

Example fix

# before
tools:
  do-cql:
    source: scylla
    parameters:
      - name: query
        type: string
      - name: query
        type: integer
# after
tools:
  do-cql:
    source: scylla
    parameters:
      - name: query
        type: string
Defensive patterns

Strategy: validation

Validate before calling

// Pre-check tool YAML before loading
toolCfg := map[string]any{"parameters": []map[string]any{{"name": "query", "type": "string"}}}
seen := map[string]bool{}
for _, p := range toolCfg["parameters"].([]map[string]any) {
    name, _ := p["name"].(string)
    if name == "" || seen[name] {
        panic("invalid parameter: missing or duplicate name " + name)
    }
    seen[name] = true
}
_, err := cfg.Initialize(context.Background())
if err != nil { log.Fatalf("tool init failed: %v", err) }

Try / catch

if _, err := cfg.Initialize(ctx); err != nil {
    var procErr error
    if errors.Unwrap(err) != nil { procErr = errors.Unwrap(err) }
    log.Fatalf("scyllacql param processing failed: %v (cause: %v)", err, procErr)
}

Prevention

When it happens

Trigger: Calling Config.Initialize (directly or via toolbox startup loading a tools config YAML) where cfg.TemplateParameters/cfg.Parameters cannot be processed: duplicate param names, invalid parameter type strings, or template/parameter merge conflicts.

Common situations: Hand-edited YAML configs for the scylla-cql tool with a typo in a parameter 'type' field, a parameter declared both in parameters and templateParameters, or a missing required 'name' field.

Related errors


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