{"record":{"id":"97bdc06683a33793","repo":"paperclipai/paperclip","slug":"tool-gateway-service-is-not-configured","errorCode":null,"errorMessage":"Tool gateway service is not configured","messagePattern":"Tool gateway service is not configured","errorType":"http","errorClass":null,"httpStatus":501,"severity":"error","filePath":"server/src/routes/tool-access.ts","lineNumber":2027,"sourceCode":"        continue;\n      }\n      candidates.push({\n        id: agent.id,\n        name: agent.name,\n        role: agent.role,\n        title: agent.title,\n        status: agent.status,\n        orgDepth: orgDepthByAgentId.get(agent.id) ?? 0,\n      });\n    }\n    candidates.sort((a, b) => a.orgDepth - b.orgDepth || a.name.localeCompare(b.name));\n    res.json({ agents: candidates });\n  });\n\n  router.get(\"/tool-connections/:connectionId/test-agents/:agentId/access\", async (req, res) => {\n    assertBoard(req);\n    if (!options.toolGateway) {\n      res.status(501).json({ error: \"Tool gateway service is not configured\" });\n      return;\n    }\n    const connection = await getAccessibleResource(req, res, svc.getConnection(req.params.connectionId as string), \"Tool connection not found\");\n    if (!connection) return;\n    await assertBoardAnyToolPermission(req, connection.companyId, [\"tools:use\", \"tools:manage_connections\"]);\n    const agentId = req.params.agentId as string;\n    await assertCanTestAsAgent(req, connection.companyId, agentId);\n    const accessSummary = await options.toolGateway.summarizeConnectionAccessForAgent({\n      companyId: connection.companyId,\n      connectionId: connection.id,\n      agentId,\n    });\n    res.json({ access: accessSummary });\n  });\n\n  router.post(\"/tool-connections/:connectionId/test-calls\", validate(toolConnectionTestCallSchema), async (req, res) => {\n    assertBoard(req);\n    if (!options.toolGateway) {","sourceCodeStart":2009,"sourceCodeEnd":2045,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/tool-access.ts#L2009-L2045","documentation":"Sentinel guard in the tool-access routes: the test-agent access endpoint requires the toolGateway service, and when options.toolGateway was not injected into the router the endpoint responds 501 'Tool gateway service is not configured'. It signals a deployment/configuration gap, not a client error — the server build lacks the gateway integration.","triggerScenarios":"Thrown at server/src/routes/tool-access.ts:1848 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Deploy/configure the server with the tool gateway service enabled so options.toolGateway is injected.","Verify the server bootstrap passes toolGateway into toolAccessRoutes options.","Treat the 501 as a feature-unavailable signal in clients and hide/disable the access-test UI."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-02T18:44:00.616Z","contentChangedAt":"2026-09-02T18:44:00.616Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}