{"record":{"id":"95fb420d27435393","repo":"googleapis/mcp-toolbox","slug":"tool-does-not-exist-s-95fb42","errorCode":null,"errorMessage":"tool does not exist: %s","messagePattern":"tool does not exist: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/mcp/v20260728/manifests.go","lineNumber":122,"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, supportsSecureParams bool) (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\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\n\t\t// Skip a Tool that requires secure params extension if the client doesn't support it.\n\t\tif tool.HasSecureParams() && !supportsSecureParams {\n\t\t\tcontinue\n\t\t}","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/mcp/v20260728/manifests.go#L104-L140","documentation":"GenerateListToolsResult iterates the group's tool names and looks each up in the PrimitiveManager via pMgr.GetTool. If a name in g.ToolNames has no registered tool, it returns \"tool does not exist: %s\". This means the group references a tool that the manager never registered, so the tools/list manifest cannot be built.","triggerScenarios":"A group's `tools:` list (or URL-selected group) contains a tool name that is absent from the server's registered tools — usually because the tool failed to load from the YAML config, was renamed, or the group config is out of sync.","commonSituations":"YAML config lists a tool under a group but the tool definition is missing or its kind is unrecognized, startup registration failed silently, config edited to rename a tool without updating the group, or using a prebuilt config where tool names changed across versions.","solutions":["Check server startup logs for tool load/registration failures for the named tool.","Ensure the tool is defined in the YAML and its `kind` is supported by this server version.","Update the group's `tools:` list to match exact registered tool names.","Restart the server after config edits so groups and registered tools stay consistent."],"exampleFix":"// before (group references undefined tool)\ngroup:\n  tools:\n    - execute_sql   # not defined\n// after\ngroup:\n  tools:\n    - execute_sql\ntools:\n  execute_sql:\n    kind: postgres-execute-sql\n    source: my-pg-instance\n","handlingStrategy":"validation","validationCode":"// Config sanity check before serving (server side):\n// every group tool name must have a tools: entry with a valid kind\nfor (const t of group.tools) {\n  if (!(t in config.tools)) throw new Error(`group references undefined tool: ${t}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const {tools} = await client.request({method:'tools/list'});\n} catch (e) {\n  if (String(e.message).includes('tool does not exist')) {\n    console.error('Server group references an unregistered tool; check server config:', e.message);\n  } else throw e;\n}","preventionTips":["Keep group tool lists generated from the same source as tool definitions.","Check startup logs for tool registration failures.","Verify each tool's kind is supported by the server version in use.","Rename tools and their group references in the same commit."],"tags":["mcp","tool-not-found","manifest","config"],"backgroundTag":"tool-not-registered","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"}