Problem with a tool - Help!
# support
a
Im trying to run a simple tool call to check supabase to see if employee is in the system and if in the system, retrieve teh first name to call the employee for the rest of the call. here is tool Id - 30bcc017-ab00-4a27-af7a-8c851712228b assistant Id - 7d96ffce-50b6-4246-b367-da2788b3231a Two strange things - It returns the name in the format from the Vapi docs suggest - See below. And it will not use the caller's name. I figured it was that the asycn - I tried false and it never returned a user as being in the system, this one is true and does recognize the user but will nott use their name - I tested a debug and the asssitant says she didn't get the name as part of the response Here is response from the Vapi Webhook dash- Code 200 . Body { "results": [ { "tool_call_id": "c29944ba-938c-4aeb-9ccd-dc3a2b3a24f3", "result": "Alex " } ] }
Hi! Any help on this would be appreciated. Thanks
@User any ideas?
v
Hey! To help track down this issue, could you share: - The call ID This would really help us figure out what went wrong!
a
Thanks! Here is a cal ID where this happens. f31406b0-983a-4236-b61f-a87b22471e11
v
Hello Alex, taking a look at the call it looks like your tool returned the name as empty: "function": { "name": "Employee_Name_retrieval4", "arguments": "{\\"name\\": \\"\\", \\"phone_number\\": \\"\[redacted\]\\"}" } } \], Double check your function and make sure it successful inputs the users name and then you should be good to go!
a
Where did you get that? On my web logs API for that callId - here is the response shown in the Vapi Dashboard. Am I missing something? Code 200 . Body { "results": [ { "tool_call_id": "c29944ba-938c-4aeb-9ccd-dc3a2b3a24f3", "result": "Alex " } ] }
v
This was directly from the server logs on your call, could you please provide me another call ID and then we can see if the same issue is happening?
a
I see where you got that info - under analysis - I see the missing employee_name I am not sure what I am doing wrong - Here is tool Id- 30bcc017-ab00-4a27-af7a-8c851712228b Here is call Id - f06212e7-5050-4677-ab67-5ba15d9379ea Here is Assistant Id 7d96ffce-50b6-4246-b367-da2788b3231a My confusion comes because here is the response I am sending back from the webhook log (which, since it is the response, I would think would capture the employee_name) in that response. Code 200 . Body { "results": [ { "tool_call_id": "c29944ba-938c-4aeb-9ccd-dc3a2b3a24f3", "result": "Alex " } ] } Where am I missing? Thanks for the help!
v
Hey Alex, the tool_call_id needs to be structured as the following: { "results": \[ { "toolCallId": "X", "result": "Y" } \] } Here are some docs on the expected response:
"toolCallId": "X" instead of tool_call_id
a
s
@Alex911 Hey Alex, for the tool call ID, you are returning the call ID which is unexpected. That's why your tool call responses are not working as you expected. Kindly return the tool call ID instead of call ID. expected call_QlKw8RGWKD7bW2Ov7Qrb74q5 actual c29944ba-938c-4aeb-9ccd-dc3a2b3a24f3 šŸ”µ 15:16:19:679 Server Message Requested...(tool-calls , https://carbontechnoxxxxxxxxaa1e896f8): { "type": "tool-calls", "toolCalls": [ { "id": "call_QlKw8RGWKD7bW2Ov7Qrb74q5", "type": "function", "function": { "name": "Employee_Name_retrieval4", "arguments": {"phone_number": "", "name": ""} } } ], "toolCallList": [ { "id": "call_QlKw8RGWKD7bW2Ov7Qrb74q5", "type": "function", "function": { "name": "Employee_Name_retrieval4", "arguments": {"phone_number": "", "name": ""} } } ], "toolWithToolCallList": [ { "type": "function", "function": { "name": "Employee_Name_retrieval4", "async": true, "parameters": { "type": "object", "required": ["name", "phone_number"], "properties": { "name": { "type": "string", "description": "This is the name of the employee." }, "phone_number": { "type": "string", "description": "This is the phone number of the employee." } } }, "description": "Check the employee database to retrieve the employee name. Returns the employee first name if found, FALSE if not." }, "async": true, "server": { "url": "https://carbontxxxxxxxxxxxx6-b681-63caa1e896f8", "timeoutSeconds": 40 }, "messages": [ { "type": "request-start", "content": "One second while I send that.", "contents": [], "conditions": [], "blocking": false }, { "type": "request-response-delayed", "content": "hmm, it's taking a second, almost there.", "conditions": [], "contents": [], "timingMilliseconds": 0 } ], "toolCall": { "id": "call_QlKw8RGWKD7bW2Ov7Qrb74q5", "type": "function", "function": { "name": "Employee_Name_retrieval4", "arguments": {"phone_number": "", "name": ""} } } } ] }
a
Ah!! I totally missed that- thank you!
v
Marking this ticket as Solved āœ