{"record":{"id":"c78c4fd0a6ba3adf","repo":"googleapis/mcp-toolbox","slug":"error-getting-parameters-for-tool-q-w","errorCode":null,"errorMessage":"error getting parameters for tool %q: %w","messagePattern":"error getting parameters for tool %q: %w","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/mcp/v20241105/manifests.go","lineNumber":123,"sourceCode":"\t\ttool, ok := pMgr.GetTool(toolName)\n\t\tif !ok {\n\t\t\treturn ListToolsResult{}, fmt.Errorf(\"tool does not exist: %s\", toolName)\n\t\t}\n\t\t// Skip a Tool that requires secure params as they are not supported in this protocol version.\n\t\tif tool.HasSecureParams() {\n\t\t\tcontinue\n\t\t}\n\t\tsrcName := tool.GetSourceName()\n\t\tvar src sources.Source\n\t\tif srcName != \"\" {\n\t\t\tsrc, ok = pMgr.GetSource(srcName)\n\t\t\tif !ok {\n\t\t\t\treturn ListToolsResult{}, fmt.Errorf(\"unable to retrieve %s source for tool %q\", srcName, tool.GetName())\n\t\t\t}\n\t\t}\n\t\tparams, err := tool.GetParameters(src)\n\t\tif err != nil {\n\t\t\treturn ListToolsResult{}, fmt.Errorf(\"error getting parameters for tool %q: %w\", toolName, err)\n\t\t}\n\t\ttoolManifest := generateToolManifest(toolName, tool.GetDescription(), tool.GetAuthRequired(), params, tool.GetAnnotations(src), urlParams)\n\t\tmcpManifest = append(mcpManifest, toolManifest)\n\t}\n\treturn ListToolsResult{Tools: mcpManifest}, nil\n}\n\n// generatePromptManifest generates a version-specific Prompt manifest for list/prompts\nfunc generatePromptManifest(name, desc string, args prompts.Arguments) Prompt {\n\tmcpArgs := make([]PromptArgument, 0, len(args))\n\tfor _, arg := range args {\n\t\tpromptArg := PromptArgument{\n\t\t\tName:        arg.GetName(),\n\t\t\tDescription: arg.GetDesc(),\n\t\t\tRequired:    parameters.CheckParamRequired(arg.GetRequired(), arg.GetDefault()),\n\t\t}\n\t\tmcpArgs = append(mcpArgs, promptArg)\n\t}","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/mcp/v20241105/manifests.go#L105-L141","documentation":"After resolving the source, GenerateListToolsResult calls tool.GetParameters(src) to build the parameter schema for the manifest. If a tool's parameter definition fails to resolve (e.g. a parameter referencing an unknown auth service or malformed template), the error is wrapped as \"error getting parameters for tool <name>: <cause>\".","triggerScenarios":"tools/list where a tool's parameters section is invalid: an auth parameter referencing an auth service not defined in the config, bad type/required fields, or a template referencing missing sources, causing GetParameters to fail.","commonSituations":"authServices defined but not linked to tool parameters (or linked with a wrong name); hand-edited YAML with wrong indentation/types in the parameters block; templates referencing fields that do not exist on the source.","solutions":["Read the wrapped cause in the message — it names the specific parameter that failed.","Check each tool parameter's auth field references an authService name that exists in your config.","Validate the parameters block structure (name, type, description, required) against the current config schema.","Fix template placeholders so they reference columns/fields that exist, then restart and retry tools/list."],"exampleFix":"# before: parameter references undefined auth service\nparameters:\n  - name: user_id\n    type: string\n    authServices:\n      - name: missing-auth  # not defined\n# after: reference a defined auth service or drop the block\nparameters:\n  - name: user_id\n    type: string","handlingStrategy":"validation","validationCode":"# Lint the config before deploy: every auth reference in parameters must exist in authServices\n# and parameter blocks must contain name/type fields\ntoolbox --tools-file tools.yaml --check  # or run the server locally and call tools/list","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate tool parameter definitions (name, type, required) against the current schema after upgrades","Ensure authServices referenced by parameters are defined in the same config","Test tools/list locally with `toolbox` before deploying config changes"],"tags":["mcp","tools-list","parameters","configuration","schema"],"backgroundTag":"invalid-parameter-schema","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}