hello,
I'm trying to use the Tools functionality. I have built a custom tool linked to an API endpoint. When I test a POST request with the following payload on Postman, I am able to correctly retrieve the information from the database. However, when I do the same via the assistant in Vapi, I get error 500.
{
"id": "call_test123",
"type": "function",
"function": {
"name": "getCallsHistory",
"arguments": {
"customer_name": "John Smith"
}
}
}
I've also tried using a different payload structure:
interface VapiRequestPayload {
id: string
customerName?: string
}
with this one, the status is 200 (success), however the call id is not included in the response, hence the assistant ignores the data and says it hasn't retrieved any information.
I've reviewed this documentation:
https://docs.vapi.ai/api-reference/webhooks/server-message#request.body.message.tool-calls but I couldn't figure out what am I doing wrong. Can anyone help?
https://cdn.discordapp.com/attachments/1324728076831031417/1324728081981902982/Screenshot_2025-01-03_at_14.15.37.png?ex=677934ab&is=6777e32b&hm=71ae7937a426cd31d9723edf1681d4ffa28d8885e71e9da69770df0eded6b5a6&