Agent doesn't capture the Tool Call Response
# support
r
I have a Tool Call (ExtractTime) with a proper schema setup to extract the "Current Date, Time, Day & Timezone" for the Agents Reference. The Tool calls a make.com scenario and successfully returns the desired output in a Webhook Response. The same Variables/Properties are also included in the Prompt with {{}} but however the Agent doesn't get this data. I am attaching some screenshots for your reference, kindly assist in resolving this at the earliest @Shubham Bajaj Ref Call ID : 6f37f0ab-e79b-49b6-85d5-07bf8c7bb714 https://cdn.discordapp.com/attachments/1295429378309623828/1295429379052142682/WhatsApp_Image_2024-10-14_at_10.16.26_PM.jpeg?ex=670e9e1f&is=670d4c9f&hm=b66c96e1776b25baf4cbc1b2bd9ee69465d3353940137c2b329110be3957508c& https://cdn.discordapp.com/attachments/1295429378309623828/1295429379735949312/WhatsApp_Image_2024-10-14_at_10.16.43_PM.jpeg?ex=670e9e20&is=670d4ca0&hm=f1571f825067ee30fb74306a2182cb3f2c9d4799a54387778b7093dce45b6ad7& https://cdn.discordapp.com/attachments/1295429378309623828/1295429380029415587/WhatsApp_Image_2024-10-14_at_10.17.28_PM.jpeg?ex=670e9e20&is=670d4ca0&hm=b8b9e7d57436b59b2ce61ed311863ce826b9ef4efcbb6bf04821870f1b4b7817& https://cdn.discordapp.com/attachments/1295429378309623828/1295429380356702318/WhatsApp_Image_2024-10-14_at_10.17.56_PM.jpeg?ex=670e9e20&is=670d4ca0&hm=05e0d5d5fea57c410b23fac603840c03a6e43e35102352ef90768fa8267d5dfb& https://cdn.discordapp.com/attachments/1295429378309623828/1295429380641919089/WhatsApp_Image_2024-10-14_at_10.18.19_PM.jpeg?ex=670e9e20&is=670d4ca0&hm=07bd193e997f1db207bb84ef1920672d4477e98d14c3091b673f62436efd6412&
v
@ripthajacker I'm here to help you with the issue you're facing. It seems like there might be a disconnect between the data being returned by the make.com scenario and the way it's being presented to the agent. To assist you better, I would need to understand how the data is being passed to the agent after the make.com scenario is executed. Since you mentioned that the variables/properties are included in the prompt with
{{}}
, it's possible that there might be an issue with the template rendering or the data flow. To resolve this, we need to ensure that the data from the Webhook Response is correctly mapped to the variables in the prompt. Could you please provide more details on how the data is being handled after the make.com scenario execution? Are there any specific error messages or logs that you can share? This information will help me guide you more effectively. If you're unable to provide these details or if the issue persists, I recommend reaching out to support for a more in-depth investigation. Please let me know how you would like to proceed!
You can continue this conversation by mentioning me in the message.
r
@Shubham Bajaj
s
šŸ”µ 04:41:49:304 Server Message Successful. (https://hook.eu2.make.com/fpugbjebov8rogham3tqqnssa1pdtd28). Response: { "results": [ { "toolCallId": "9b2318cc-d901-414b-9704-878458411387", "result": { "currentDate": ""2024-10-13"", "currentTime": ""21:41:49"", "currentDay": ""Sunday"", "timezone": "MST" } } ] }
r
Hi @User !! I did everything You said Including the JSON.stringify like you suggested. Here is the edited code you sent me : { "results": [ { "toolCallId": "{{1.message.assistant.model.toolIds[]}}", "result": "{timezone: {{3.timezone}}, currentDay: {{3.currentDay}}, currentDate: {{3.currentDate}}, currentTime: {{3.currentTime}}}" } ] } I'm also attaching screenshots again for your reference. Make.com outputs the correct result and is also being successfully passed on the Webhook Response in the expected format. But It still doesn't work. Here is another call ID : 24dd2b4e-8888-4bef-8759-81198f2220d3 / 0592d276-91df-4ba1-aacb-c8085ca4d36b I also disabled Function Calls after watching the video on the Tool Calls Documentation Page. Please check and help me resolve this at the earliest. https://cdn.discordapp.com/attachments/1295429378309623828/1295753225890431098/WhatsApp_Image_2024-10-15_at_7.38.37_PM.jpeg?ex=670fcbba&is=670e7a3a&hm=d38e299d003c3a24b4fa0903b2f476ea22e87c108f6a057a3ecc3718661405db& https://cdn.discordapp.com/attachments/1295429378309623828/1295753226271854592/WhatsApp_Image_2024-10-15_at_7.38.37_PM_1.jpeg?ex=670fcbbb&is=670e7a3b&hm=c9fb5ae8e84d626030b40ff9c4b2a301c1ca79d30582b77de673ee6dc78429ba&
s
Your returning call id in place of tool call id. The tool call id starts e.g.
call_mVA4ERQQb3LDE8GTm5BwIh1G
current[not-working]
šŸ”µ 14:05:51:221 Server Message Successful. (https://hook.eu2.make.com/fpugbjebov8rogham3tqqnssa1pdtd28). Response: { "results": [ { "toolCallId": "9b2318cc-d901-414b-9704-878458411387", "result": "{timezone: MST, currentDay: "Tuesday", currentDate: "2024-10-15", currentTime: "07:05:51"}" } ] }
expected
šŸ”µ 14:05:51:221 Server Message Successful. (https://hook.eu2.make.com/fpugbjebov8rogham3tqqnssa1pdtd28). Response: { "results": [ { "toolCallId": "call_mVA4ERQQb3LDE8GTm5BwIh1G", "result": "{timezone: MST, currentDay: "Tuesday", currentDate: "2024-10-15", currentTime: "07:05:51"}" } ] }
r
Tool Call ID is the problem ?
call_mVA4ERQQb3LDE8GTm5BwIh1G I don't find this anywhere on the Tool Call Webhook Request.
s
we send tool call id on each webhook request. check docs: https://docs.vapi.ai/tools-calling check this for request payload: https://api.vapi.ai/api-json go to components > schemas > ServerMessageToolcalls
a
there are double quotes on response items
maybe something?
s
can you be more clear here?