{"record":{"id":"3716a24fa559ed69","repo":"paperclipai/paperclip","slug":"elicitation-required","errorCode":"elicitation_required","errorMessage":"MCP tool requested additional input","messagePattern":"MCP tool requested additional input","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":409,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":5682,"sourceCode":"      tool: input.tool,\n    });\n    await writeAudit({\n      session: input.session,\n      companyId: input.session.companyId,\n      agentId: input.session.agentId,\n      runId: input.session.runId,\n      issueId: input.session.issueId,\n      action: \"tool_gateway.elicitation_requested\",\n      details: {\n        invocationId: input.invocationId,\n        interactionId: interaction.id,\n        decision: \"defer_runtime\",\n        reasonCode: \"elicitation_required\",\n        tool: input.tool.name,\n        ...toolAuditMetadata(input.tool),\n      },\n    });\n    throw new ToolGatewayHttpError(\n      409,\n      \"MCP tool requested additional input\",\n      \"elicitation_required\",\n      {\n        invocationId: input.invocationId,\n        interactionId: interaction.id,\n        tool: input.tool.name,\n      },\n    );\n  }\n\n  function normalizeMcpContent(content: unknown): string {\n    if (!Array.isArray(content)) throw malformedRemoteMcpResponse();\n    return content\n      .map((item) => {\n        const record = asRecord(item);\n        if (!record || typeof record.type !== \"string\")\n          throw malformedRemoteMcpResponse();","sourceCodeStart":5664,"sourceCodeEnd":5700,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L5664-L5700","documentation":"Elicitation path: the gateway converted an upstream MCP elicitation request into a human interaction card and recorded an elicitation_requested audit event (decision defer_runtime). The 409 tells the agent the tool needs more input; the run should wrap up and wait for the interaction decision rather than retry the call.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:3003 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The MCP tool needs more input (elicitation). Provide the requested fields and retry the call."],"exampleFix":null,"handlingStrategy":"try-catch","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"}