Function calling issue
# support
k
Now I'm looking for technical help in fixing the tools function. Hope you can help me with this. Use case: Vapi AI will interact with our customers and ask a few questions. Example : What is your Registration number? What is the graduation status? What is the Degree?. Once the customer answers to these questions Vapi should send the answers to our API immediately during the call in a json format. Example : {registrationNumber : 98784, degree : B.E} AI will continue to ask questions and the answer should be forwarded to our API during the call. What we tried: 1. We have created a function under the tools section called "liveSummary" 2. This instruction is given in the system prompt along with the whole script: Send the registrationNumber and degree to the liveSummary function immediately once you get the input from the verifier Issue: Vapi speaks through the script well and we are getting transcripts and end of the call report but it is not hitting our API during the call once the Registration Number and Degree is received from the user. I have attached the screenshots below https://cdn.discordapp.com/attachments/1365239153335205939/1365239153989779476/vapi_snips.png?ex=680c958b&is=680b440b&hm=8b4ece516618e0214fe5e1f3a4aded1cfd4e9d0709ac2a1dc00ac10c222de91e& https://cdn.discordapp.com/attachments/1365239153335205939/1365239154291511398/vapi_snips_2.png?ex=680c958b&is=680b440b&hm=a784749a848c9aba4d23bacd8b80d384b2880b320af5f341362e3dda5bc55936& https://cdn.discordapp.com/attachments/1365239153335205939/1365239154589569034/vapi_snips_3.png?ex=680c958b&is=680b440b&hm=1efe803c329cf27d49b2c3eddd5d8df9586a8fc81d4f36736ff1f81b7855b13b&
v
Check your server response format. Your API endpoint must respond with the correct JSON structure including the `toolCallId`:
Copy code
json
{
    "results": [
        {
            "toolCallId": "unique-id-from-vapi-request",
            "result": "success or your response data"
        }
    ]
}
Verify your server is correctly processing HTTP requests and returning this format, as improper response handling is a common cause of tool triggering failures. Source: - [Vapi Tools Calling Documentation](https://docs.vapi.ai/tools-calling)
k
We are using web snippets and we are not getting the toolCallId (unique id from vapi) in response once the call is initiated
l
@kk I had a similair issue. I had to specifically grab everything that Vapi sent as a raw file then use that to set the toolCallId further down the process. If you just grab the input directly is coming up as null for me. No idea why.
s
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!