Tool Call Issue
# support
l
Call ID: 019ab6e2-6a26-7ee4-ac7c-f273b25e750b There is an issue in this call where I noticed the AI agent would call the same tool twice at the same time, resulting in an error. I know the tool it is calling (Supabase Edge Function) is error free. Why is the tool getting called twice at the same time? Is there a way to prevent this? https://cdn.discordapp.com/attachments/1443658174413541446/1443658174631776406/image.png?ex=694e2032&is=694cceb2&hm=d21bdb389c668d566c1a55bbc640651968ac536a771fbe2e39c8bf6eca202e1e& https://cdn.discordapp.com/attachments/1443658174413541446/1443658175093014631/image.png?ex=694e2032&is=694cceb2&hm=5bc0d17be6148d0c275f65cbed5dd3f1b0c9e08facaa80e109ff9350e362356a&
v
To help prevent duplicate tool calls, set
"async": false
in your tool configuration. This ensures the tool runs synchronously and avoids parallel execution. For example:
Copy code
json
{
  "type": "function",
  "function": { "name": "yourToolName", ... },
  "async": false
}
This change should reduce or eliminate duplicate tool calls for your Supabase Edge Function. For more details, see the [Custom Tools Troubleshooting guide](https://docs.vapi.ai/tools/custom-tools-troubleshooting). Source: - [Custom Tools Troubleshooting](https://docs.vapi.ai/tools/custom-tools-troubleshooting)
c
Hey there, we reviewed the details of your request and brought this to our team's attention. We will be getting back to you as soon as we can. Thank you for your continued patience!
the prompt needs to have more explicit instructions on how to perform tool calls. because in this call id you are trying to schedule appointments for two different people, its using the information from both patients in separate tool calls. to troubleshoot the error, please send the tool call response payload you are sending to Vapi and we will review it to make sure its in the right format