{"record":{"id":"17649bddde7fda4d","repo":"googleapis/mcp-toolbox","slug":"tool-does-not-exist-s-17649b","errorCode":null,"errorMessage":"tool does not exist: %s","messagePattern":"tool does not exist: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/mcp/v20241105/manifests.go","lineNumber":107,"sourceCode":"\t\t}\n\t\tif len(authParamList) > 0 {\n\t\t\tauthParam[name] = authParamList\n\t\t}\n\t}\n\treturn InputSchema{\n\t\tType:       \"object\",\n\t\tProperties: properties,\n\t\tRequired:   required,\n\t}, authParam\n}\n\n// GenerateListToolsResult generates tools/list method result according to mcp schema\nfunc GenerateListToolsResult(pMgr *primitives.PrimitiveManager, g group.Group, urlParams map[string]string) (ListToolsResult, error) {\n\tmcpManifest := make([]Tool, 0, len(g.ToolNames))\n\tfor _, toolName := range g.ToolNames {\n\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)","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/mcp/v20241105/manifests.go#L89-L125","documentation":"GenerateListToolsResult iterates the tool names of the connected group and fetches each from the PrimitiveManager. If a group references a tool name that is not registered (GetTool fails), it returns \"tool does not exist: <name>\". This is a config/integrity problem: a toolset lists a tool the manager does not contain.","triggerScenarios":"tools/list against a toolset whose definition includes a tool name that was removed, renamed, or misspelled in the config; two tool definitions sharing a name so one is dropped during registration; a prebuilt/templated config referencing a tool unavailable in the current build.","commonSituations":"Hand-edited tools.yaml where a toolset references a deleted tool; case-sensitivity mistakes in tool names; SDK/source gating (a tool compiled out or failing to initialize) leaving a dangling reference; stale docs/samples pointing at removed tools.","solutions":["Open your tools config and fix the toolset entry so every tool name matches an existing tool definition exactly.","Check server startup logs for tool registration/initialization failures or duplicate-name warnings that dropped a tool.","Run a config validation / start the server locally and inspect /api/toolset or the manifest to confirm which tools registered.","Update or regenerate the toolset config if it was based on an older schema or prebuilt config."],"exampleFix":"# before: toolset references a removed tool\ntoolsets:\n  finance:\n    - list-orders\n    - removed-query\n# after: only tools that exist\ntoolsets:\n  finance:\n    - list-orders\n    - run-query","handlingStrategy":"validation","validationCode":"# Before starting clients, check the manifest for the expected tools\ncurl -s http://127.0.0.1:5000/mcp/<group>/... -X POST \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}' | jq '.result.tools[].name'","typeGuard":null,"tryCatchPattern":"if (res.error && res.error.code === -32600 && /tool does not exist/.test(res.error.message)) {\n  // reload config or reconnect to a valid toolset\n}","preventionTips":["Cross-check every toolset entry against defined tool names before deploying the config","Watch startup logs for tool registration/duplicate-name failures","Keep tool and toolset names in one place or generate the toolset list programmatically"],"tags":["mcp","tools-list","toolset","configuration"],"backgroundTag":"missing-tool-definition","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"}