Tool Calling Results Issue
# support
h
Call ID: 514bc998-1101-42af-a3c5-3fc38021316e { "results": [ { "toolCallId": "X", "result": "Y" } ] } Sending results in this format yet in the call getting a "No result returned"
v
Hi there! I see you're having trouble with tool call results in Vapi. Looking at your JSON format, I notice you're using placeholder values "X" and "Y" - this might be the issue! The JSON structure is correct, but you need to use the actual toolCallId from the original request, not literally "X". Here's what might be happening: 1. **Placeholder Values**: The
toolCallId
should match the ID received in the original tool call request from Vapi (like "call_lHZzsNi9vjMGtIdVZ8KUIIa2"), and the
result
should contain your actual response data. 2. **Result Formatting**: Ensure your
result
is a single line string without any line breaks, as these can cause parsing issues. 3. **Synchronous Tool Calls**: Vapi might be treating the call as failed without waiting for the complete timeout period, especially if your tool is set to synchronous. 4. **Network/Server Issues**: Check that your server is properly responding with a 200 status code. Here's an example of a correctly formatted response:
Copy code
json
{
"results": [
  {
    "toolCallId": "call_lHZzsNi9vjMGtIdVZ8KUIIa2",
    "result": "The following timeslots are available: 2025-01-14T15:30:00-05:00, 2025-01-14T17:00:00-05:00"
  }
]
}
Let me know if replacing the placeholders resolves your issue! 🛠️ Sources: - [Common reasons for "No result returned" message](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342336047589359618) - [Correct JSON format for tool call results](https://docs.vapi.ai/tools-calling) - [Vapi tool call response handling](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342176467714572400)
d
@Mason please see this sir
k
Hey! To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help us figure out what went wrong!
h
I already provided the call id. And its simple during a tool call the results that we passed back in the "result" part of the json as a string aren't being shown in the call logs instead its "No result returned" this was only happening witjh openai models
k
Hello Hugo, we aren't getting anything back directly from your tool call to the KB: }, "toolCallResult": { "name": "knowledge_base_liv", "toolCallId": "call_ZfKyogbjtPbMxOZ7c6rybZBH", "error": "No result returned." } Could you please switch the model to a non openAI model and provide me a call ID of it working? When you send the tool call please keep an eye on your server logs and let me know if anything pops out.
3 Views