https://retellai.com/?utm_source=discord&utm_medium=seo logo
MCP client fails on error tool result
# ❓・bug-report
e
Encountering an error when MCP client receives tool call result:
Copy code
tool_call_id: 19cf3c2400e148f5

"Error: undefined\n at MCPClient.callTool (file:///usr/src/app/dist/mcp.js:79:23)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async SessionStateReducer.nextRetellLlmState (file:///usr/src/app/dist/response_generator/retell_llm/session_state_reducer.js:273:36)\n at async file:///usr/src/app/dist/api/agent_api.js:1360:23\n at async file:///usr/src/app/dist/server.js:104:13"
This only happens when the tool call result is an error of this type:
Copy code
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Failed to fetch weather data: API rate limit exceeded"
      }
    ],
    "isError": true
  }
}
(source: https://modelcontextprotocol.io/specification/draft/server/tools#error-handling) I believe this worked a few days ago. Seems like recent breaking change to the client.
s
Hi @esybl we noted this issue please also report this issue at support@retellai.com.