{"record":{"id":"99a19e236d16b3d1","repo":"googleapis/mcp-toolbox","slug":"internal-error-99a19e","errorCode":"INTERNAL_ERROR","errorMessage":"tool does not exist: %s","messagePattern":"tool does not exist: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/mcp/v20250618/manifests.go","lineNumber":108,"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":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/mcp/v20250618/manifests.go#L90-L126","documentation":"GenerateListToolsResult iterates the group's ToolNames and looks each up in the PrimitiveManager; a missing tool aborts tools/list generation with this INTERNAL_ERROR. It signals that the group references a tool name that is not registered globally.","triggerScenarios":"A group.Group contains a tool name absent from pMgr — group constructed from config referencing a tool that failed to initialize, was renamed, or was removed by a concurrent reload while a tools/list call is served.","commonSituations":"Typo'd tool name in the toolbox YAML prebuilt/group config; a tool's init/registration failing silently so it never lands in the manager; custom code building groups with hardcoded names.","solutions":["Verify every tool name referenced in the server config matches a registered tool (compare against a working tools/list output)","Restart the server to rebuild group and manager consistently after config changes","Check startup logs for tool initialization failures that leave the tool unregistered"],"exampleFix":"// before (config)\ntools:\n  - execute_query\n// after\ntools:\n  - execute-sql","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { const res = await mcp.request('tools/list', {}); } catch (e) { if (e.code === -32603 && /tool does not exist/.test(e.message)) { console.error('group references unregistered tool, restart server / fix config:', e.message); } else throw e; }","preventionTips":["Generate group tool lists from the same config that registers tools","Check startup logs for failed tool registrations","Restart after any config change instead of assuming hot-reload consistency"],"tags":["mcp","tools","internal-error","consistency"],"backgroundTag":"resource-not-found","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"}