Issue on function tool calling
# support
s
I have been created my custom server to handle some of the functions like mail triggering & incoming-phone call detecting 1. Incoming phone call detecting: I am trigger the server call to my server while user connected to the call & at the time I am taking the incoming call number & store in it db with of call id. Then I write one function call to get the incoming call by the agent - Attached the tool to the agent. Issue facing here is : Sometime the tool is invoked / most of the time not invoked as expected ( even I mentioned the name in the prompt too ). At the time of invokation too the agent is not getting the response object even though my server is successfully respond 200 with number object. 2. Most of my function tool call is not working as expected - mainly the agent getting fails to invoke the tool when it is needed. Mail trigger tool is invoking I have give the accepted parameter as message, toEmail, subject but it give something like this one below toolWithToolCallList: [ { type: 'function', function: [Object], async: false, server: [Object], messages: [], toolCall: [Object] } ], artifact: { messages: [ [Object], [Object], [Object], [Object], [Object], [Object], ], }, even I have mentioned it one too in prompt. but not passing it correctly. Note: We are exploring this product since this monday - we have gone through your complete documentation. but there are lot of issues in the application. We are litterally figuring out so frustated to configure all those stuffs - even after configuration not working as expected. $40 is burn out without even giving poc to our client. @Vapi Team Please figure out this issue.
v
To improve function tool calling reliability, ensure your server responds with the exact format Vapi expects:
Copy code
json
{
  "results": [
    {
      "toolCallId": "YOUR_TOOL_CALL_ID",
      "result": "Your result here"
    }
  ]
}
Double-check that your tool's name and parameters in the assistant configuration match exactly, and that your server is accessible and returns the correct fields. This strict format is required for the agent to process the response properly. For more details, see the [Custom Tools Guide](https://docs.vapi.ai/tools/custom-tools). Source: - [Custom Tools Guide](https://docs.vapi.ai/tools/custom-tools)
s
This is my server object { "id": "c509e7fa-a1b3-421c-9a55-846009862476", "createdAt": "2025-05-22T16:57:22.724Z", "updatedAt": "2025-05-22T17:02:17.892Z", "type": "function", "function": { "name": "send-confirmation-email", "description": "Use this tool to send Email for appointment confirmation", "parameters": { "type": "object", "properties": { "message": { "description": "Share the appointment confirmation message - \"You appointment with the urbn dental on the [date] & [time] at [location] is confirmed. Please visit 30mins before.\"", "type": "string" }, "subject": { "description": "Subject of the mail", "type": "string" }, "toEmail": { "description": "User email for sharing the appointment confirmation", "type": "string" } }, "required": [ "message", "toEmail" ] } }, "orgId": "37b1dbfa-fe2c-43cc-8b5f-e5b0f02766fd", "server": { "url": "https://d54e-103-130-204-200.ngrok-free.app/send-email", "headers": {} }, "async": false } I receive message parameter - timestamp: 1747983887505, type: 'tool-calls', toolCalls: [ { id: 'call_l7Al9UyW9pDodWtCkm659sfd', type: 'function', function: [Object] } ], toolCallList: [ { id: 'call_l7Al9UyW9pDodWtCkm659sfd', type: 'function', function: [Object] } ], toolWithToolCallList: [ { type: 'function', function: [Object], async: false, server: [Object], messages: [], toolCall: [Object] } ],
v
It looks like the most important step for reliable function tool calling is to make sure your server responds with the exact format Vapi expects, including the correct
toolCallId
and result fields. Double-check that your tool's name and parameters in your assistant configuration match exactly, and that your server is accessible and returning the required fields. This strict format is necessary for the agent to process responses properly. If you've already set this up and are still seeing issues, reviewing the exact payloads and responses exchanged between your server and Vapi could help identify any mismatches or missing fields. Source: - [Custom Tools Guide](https://docs.vapi.ai/tools/custom-tools)
k
Can you send me the call_id?
s
@User I am facing similar issue, the tool call is not being initiated at all. Check the logs of this call ID for rference. 0e6d5cb7-6483-4a4b-9962-74bdd858ca0b
k
Hey Santosh! To help track down this issue, could you share: - 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!
Hey Santosh! To help track down this issue, could you share: - 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!
2 Views