{"record":{"id":"a0ea611ae86afe50","repo":"googleapis/mcp-toolbox","slug":"internal-error-a0ea61","errorCode":"INTERNAL_ERROR","errorMessage":"error generating manifest: %w","messagePattern":"error generating manifest: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/mcp/v20251125/method.go","lineNumber":124,"sourceCode":"func pingHandler(id jsonrpc.RequestId) (any, error) {\n\treturn jsonrpc.JSONRPCResponse{\n\t\tJsonrpc: jsonrpc.JSONRPC_VERSION,\n\t\tId:      id,\n\t\tResult:  struct{}{},\n\t}, nil\n}\n\nfunc toolsListHandler(ctx context.Context, id jsonrpc.RequestId, primitiveMgr *primitives.PrimitiveManager, g group.Group, body []byte) (any, error) {\n\tvar req ListToolsRequest\n\tif err := json.Unmarshal(body, &req); err != nil {\n\t\terr = fmt.Errorf(\"invalid mcp tools list request: %w\", err)\n\t\treturn jsonrpc.NewError(id, jsonrpc.INVALID_REQUEST, err.Error(), nil), err\n\t}\n\n\turlParams, _ := util.UrlParamsFromContext(ctx)\n\tlistToolsResult, err := GenerateListToolsResult(primitiveMgr, g, urlParams)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"error generating manifest: %w\", err)\n\t\treturn jsonrpc.NewError(id, jsonrpc.INTERNAL_ERROR, err.Error(), nil), err\n\t}\n\treturn jsonrpc.JSONRPCResponse{\n\t\tJsonrpc: jsonrpc.JSONRPC_VERSION,\n\t\tId:      id,\n\t\tResult:  listToolsResult,\n\t}, nil\n}\n\n// toolsCallHandler generate a response for tools call.\nfunc toolsCallHandler(ctx context.Context, id jsonrpc.RequestId, g group.Group, primitiveMgr *primitives.PrimitiveManager, body []byte, header http.Header) (any, error) {\n\tif header != nil {\n\t\tif clientIP := util.ExtractClientIP(header); clientIP != \"\" {\n\t\t\tctx = util.WithClientIP(ctx, clientIP)\n\t\t}\n\t}\n\n\tauthServices := primitiveMgr.AuthServices()","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/mcp/v20251125/method.go#L106-L142","documentation":"Wraps any error from GenerateListToolsResult while handling tools/list in protocol version 2025-11-25. Manifest generation failed — typically an inner error 312/313/314 (missing tool, missing source, or GetParameters failure). The client receives an INTERNAL_ERROR JSON-RPC response with the wrapped cause.","triggerScenarios":"tools/list invoked when any tool in the group cannot be resolved, its source cannot be retrieved, or its parameter schema cannot be generated.","commonSituations":"Server started with partially broken tool configs (bad SQL, missing sources) — requests fail only when tools/list enumerates the broken tool; runtime database connectivity loss during parameter generation.","solutions":["Read the wrapped cause after 'error generating manifest:' to find the specific tool problem.","Fix the offending tool's config (valid source reference, valid SQL statement, valid parameters).","Check server startup logs for tool/source initialization failures and resolve them.","Test the database connectivity of each source referenced by your tools."],"exampleFix":"// before: broken tool breaks the whole manifest\ntools:\n  broken_tool:\n    source: missing_source\n// after: reference an initialized source\ntools:\n  broken_tool:\n    source: postgres","handlingStrategy":"try-catch","validationCode":"// Before tools/list, confirm the server is healthy and config validated\ncurl -f http://localhost:5000/api/toolbox/validate || exit 1","typeGuard":null,"tryCatchPattern":"try {\n  const res = await rpc.call('tools/list', {});\n} catch (e) {\n  if (e.code === -32603 && /error generating manifest/.test(e.message)) {\n    const cause = e.message.split('error generating manifest:')[1];\n    // surface the wrapped cause; fix server tool config before retrying\n  } else throw e;\n}","preventionTips":["Run config validation at startup so broken tools never reach tools/list.","Monitor source database connectivity health.","Read the wrapped cause in the error to identify the failing tool quickly."],"tags":["mcp","tools-list","manifest","internal-error"],"backgroundTag":"manifest-generation-failed","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"}