{"record":{"id":"2e8e934f2432acea","repo":"googleapis/mcp-toolbox","slug":"unable-to-process-parameters-w","errorCode":null,"errorMessage":"unable to process parameters: %w","messagePattern":"unable to process parameters: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/scylladb/scyllacql/scyllacql.go","lineNumber":72,"sourceCode":"\nfunc newConfig(ctx context.Context, name string, decoder *yaml.Decoder) (tools.ToolConfig, error) {\n\tactual := Config{ConfigBase: tools.ConfigBase{Name: name}}\n\tif err := decoder.DecodeContext(ctx, &actual); err != nil {\n\t\treturn nil, err\n\t}\n\treturn actual, nil\n}\n\n// ToolConfigType implements tools.ToolConfig.\nfunc (cfg Config) ToolConfigType() string {\n\treturn resourceType\n}\n\n// Initialize implements tools.ToolConfig.\nfunc (cfg Config) Initialize(context.Context) (tools.Tool, error) {\n\tallParameters, paramManifest, err := parameters.ProcessParameters(cfg.TemplateParameters, cfg.Parameters)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to process parameters: %w\", err)\n\t}\n\n\treturn Tool{\n\t\tBaseTool: tools.NewBaseTool(\n\t\t\tcfg,\n\t\t\ttools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewDestructiveAnnotations),\n\t\t\ttools.Manifest{Description: cfg.Description, Parameters: paramManifest, AuthRequired: cfg.AuthRequired},\n\t\t\tallParameters,\n\t\t),\n\t}, nil\n}\n\nvar _ tools.Tool = Tool{}\n\ntype Tool struct {\n\ttools.BaseTool[Config]\n}\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/scylladb/scyllacql/scyllacql.go#L54-L90","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the wrapped cause after 'unable to process parameters:' in the message to identify the exact parameter problem","Check the scyllacql tool config YAML for duplicate parameter names between parameters and templateParameters","Fix invalid parameter type declarations (use supported types like string, integer, boolean, array)","Run the minimal repro with the corrected YAML and restart the server"],"exampleFix":"# before\ntools:\n  do-cql:\n    source: scylla\n    parameters:\n      - name: query\n        type: string\n      - name: query\n        type: integer\n# after\ntools:\n  do-cql:\n    source: scylla\n    parameters:\n      - name: query\n        type: string","handlingStrategy":"validation","validationCode":"// Pre-check tool YAML before loading\ntoolCfg := map[string]any{\"parameters\": []map[string]any{{\"name\": \"query\", \"type\": \"string\"}}}\nseen := map[string]bool{}\nfor _, p := range toolCfg[\"parameters\"].([]map[string]any) {\n    name, _ := p[\"name\"].(string)\n    if name == \"\" || seen[name] {\n        panic(\"invalid parameter: missing or duplicate name \" + name)\n    }\n    seen[name] = true\n}\n_, err := cfg.Initialize(context.Background())\nif err != nil { log.Fatalf(\"tool init failed: %v\", err) }","typeGuard":null,"tryCatchPattern":"if _, err := cfg.Initialize(ctx); err != nil {\n    var procErr error\n    if errors.Unwrap(err) != nil { procErr = errors.Unwrap(err) }\n    log.Fatalf(\"scyllacql param processing failed: %v (cause: %v)\", err, procErr)\n}","preventionTips":["Validate tool YAML against the schema before starting the server","Never declare the same parameter name in both parameters and templateParameters","Use only documented parameter types (string, integer, boolean, array)","Run `toolbox --prebuilt <name>` or a dry-run load in CI to catch config errors early"],"tags":["config","parameters","scylladb","startup"],"backgroundTag":"invalid-config-parameter","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}