{"record":{"id":"576ec99b794a86ab","repo":"paperclipai/paperclip","slug":"local-stdio-connection-disabled","errorCode":"local_stdio_connection_disabled","errorMessage":"Connection is disabled.","messagePattern":"Connection is disabled\\.","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":403,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":4759,"sourceCode":"    const [connection] = await db\n      .select()\n      .from(toolConnections)\n      .where(\n        and(\n          eq(toolConnections.id, entry.connectionId),\n          eq(toolConnections.companyId, session.companyId),\n        ),\n      )\n      .limit(1);\n    if (!connection || connection.transport !== \"local_stdio\") {\n      throw new ToolGatewayHttpError(\n        404,\n        `Tool \"${tool.name}\" not found`,\n        \"tool_not_found\",\n      );\n    }\n    if (!connection.enabled || connection.status !== \"active\") {\n      throw new ToolGatewayHttpError(\n        403,\n        \"Connection is disabled.\",\n        \"local_stdio_connection_disabled\",\n        {\n          connectionId: connection.id,\n        },\n      );\n    }\n    return { entry, connection };\n  }\n\n  function localStdioTemplateId(\n    connection: typeof toolConnections.$inferSelect,\n  ): string {\n    const config = asRecord(connection.config) ?? {};\n    const templateId = config.templateId;\n    if (typeof templateId !== \"string\" || templateId.trim().length === 0) {\n      throw new ToolGatewayHttpError(","sourceCodeStart":4741,"sourceCodeEnd":4777,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L4741-L4777","documentation":"Local stdio MCP connection guard: the catalog entry resolved to a connection whose transport is not local_stdio (or that is disabled/inactive), so local stdio dispatch is refused. Indicates the tool's connection type changed or the connection was disabled, and the agent should not keep retrying the call.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:2565 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the connection in connection settings before invoking its tools."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-09-18T08:03:59.046Z","contentChangedAt":"2026-09-18T08:03:59.046Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}