Hi Vapi Team, im trying to build ai assistant, i want it to use tools to connect my api and get the information online. I’m experiencing an issue where tool_result is correctly sent from my websocket integration (with structured JSON and message field), but the assistant repeatedly says "I couldn't find any patient" and continues calling the same tool_call ID over and over.
I’ve attached logs showing:
Correct payload
Proper tool name and output
Static tool_call_id
It seems tool_result is not being accepted or recognized.
Could you help clarify what the assistant expects in this case?
https://cdn.discordapp.com/attachments/1383506902104670208/1383506902306132079/message.txt?ex=684f0ab5&is=684db935&hm=43fd0f8ccf4b1be2322deef5f5d95f1fcfacca55e0159d61917b663966220c2c&
k
Kings_big💫
06/14/2025, 6:20 PM
Ensure your server returns HTTP 200 with Content-Type: application/json and a JSON body like {"results":[{"toolCallId":"","result":""}]} where toolCallId matches exactly and result is a string without line breaks..
a
archpunch
06/14/2025, 7:26 PM
can i some how send it via WebSocket?
k
Kings_big💫
06/14/2025, 9:36 PM
Yes, by connecting to Vapi’s websocketCallUrl and sending a JSON message like {"toolCallId":"", "result":""} over the socket instead of using HTTP..