{"record":{"id":"965e50d9370f6c09","repo":"googleapis/mcp-toolbox","slug":"internal-error-965e50","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/v20250618/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/v20250618/method.go#L106-L142","documentation":"After parsing the tools/list request, the server calls GenerateListToolsResult to build the tool manifest (converting registered tool configs into MCP tool descriptors). If that generation fails for any tool, the whole listing fails with JSON-RPC INTERNAL_ERROR 'error generating manifest'.","triggerScenarios":"A registered tool whose Config cannot be converted to its manifest form — e.g. a tool definition with an invalid parameter schema, missing description, or a failing ToConfig/Manifest conversion inside a custom or misconfigured tool.","commonSituations":"Custom tool YAML configs with malformed parameter definitions; a newly added source/tool package whose manifest generation has a bug; group filters (via URL params) that produce an inconsistent tool set.","solutions":["Inspect the wrapped cause (%w) in the response — it points at the specific tool/config that failed","Validate your tools YAML (tool name, description, parameters schema) against the documented schema","Run the toolbox with --prebuilt or your config and check startup logs for tool parse warnings","Bisect by removing tools/groups from the config until the listing succeeds, then fix the offending tool"],"exampleFix":"// before\ntools:\n  my_tool:\n    kind: postgres-sql\n    description: \"\"\n    source: my-pg\n    statement: SELECT 1\n// after\ntools:\n  my_tool:\n    kind: postgres-sql\n    description: \"Runs a health check query\"\n    source: my-pg\n    statement: SELECT 1","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { const res = await listTools(); } catch (e) { if (e.code === -32603 && /manifest/.test(e.message)) { console.error(\"server failed to build tool manifest:\", e.message); } else throw e; }","preventionTips":["Validate tool YAML (description, parameters schema) before deploying","Check startup logs for tool config parse warnings","Bisect configs by removing tools until the failing one is isolated"],"tags":["mcp","manifest","tools-list","config"],"backgroundTag":"tool-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"}