nfs-avn
12/03/2025, 4:45 AMapiRequest tool call. I use the dashboard. I've thoroughly debugged the issue and would appreciate your assistance.
Issue Details:
- I've configured an API request tool that returns data including fields like date, dayOfWeek etc.
- I've mapped these responses to dynamic variables in the tool configuration in response body. See attached images. the Response Body is auto generated when I test the tool call using "Save Schema"
- When I check the call logs, I can see the tool call executes successfully
- However, the system prompt is not being re-rendered with the populated variables (I checked the model Azure OpenAI HTTP request -> attributes.request.messages)
- All variable references (e.g., {{data.dayOfWeek}}, {{data}}) are being replaced with empty strings even after the tool call completes
Debugging Steps Taken:
- Verified the API request tool is executing successfully in the call logs
- Confirmed the API is returning the expected data structure
- Added debug statements to the system prompt to check variable rendering
- Verified that built-in variables like {{now}} are rendering correctly
- Checked multiple conversation turns after the tool call completes
- Examined the model requests that occur after the tool call in the call logs and latest model request in the call
Am I debugging it wrong? What's the best way to debug it?
Additional Information:
- Assistant ID: bc4d9f7f-01f2-4370-9604-f77f684fe1a1
- Call ID for reference: 019ae217-d360-7000-8095-7dd4bc00798d
I would greatly appreciate your help in resolving this issue. Please let me know if you need any additional information.
https://cdn.discordapp.com/attachments/1445637070981824542/1445637072676454530/image.png?ex=694ac730&is=694975b0&hm=3661f4ab7e2fd1d56b8841c83784f52f05f2157bf7fd8a61a74abaea34495068&Vapi Support Bot
12/03/2025, 4:46 AMjson
{
"data": {
"dayOfWeek": "Monday"
},
"success": true,
"timestamp": "2025-12-03T04:45:36Z"
}
then reference the variable in your prompt as {{data.dayOfWeek}}. If the structure or key names differ, the variable will not populate—ensure both the API response and the extraction schema are in sync as shown in the [dynamic variables documentation](https://docs.vapi.ai/assistants/dynamic-variables).
Source:
- [Dynamic Variables documentation](https://docs.vapi.ai/assistants/dynamic-variables)nfs-avn
12/03/2025, 4:49 AM{
"id": "log-43",
"level": 30,
"time": 1764729819473,
"timestamp": 1764729819473000000,
"severityText": "INFO",
"severityNumber": 9,
"body": "Tool calls finished",
"attributes": {
"category": "tool",
"callId": "019ae217-d360-7000-8095-7dd4bc00798d",
"orgId": "87126cb3-1bd3-4e51-b782-1958b6307b99",
"runDurationMs": 433,
"totalResults": 1,
"errorsCount": 0,
"results": [
{
"name": "getCurrentTime",
"toolCallId": "call_BkoNSi8jaazzRTNQxVaizejU",
"type": "apiRequest",
"result": "{\n \"success\": true,\n \"data\": {\n \"dayOfWeek\": \"Wednesday\",\n \"date\": 3,\n \"month\": \"December\",\n \"year\": 2025,\n \"time\": \"12:43 PM\",\n \"timezone\": \"Australia/Brisbane\",\n \"locationName\": \"xxx\",\n \"isOpen\": true\n },\n \"timestamp\": \"2025-12-03T02:43:39.317Z\"\n}",
"metadata": {
"responseBody": {
"success": true,
"data": {
"dayOfWeek": "Wednesday",
"date": 3,
"month": "December",
"year": 2025,
"time": "12:43 PM",
"timezone": "Australia/Brisbane",
"locationName": "xxx",
"isOpen": true
},
"timestamp": "2025-12-03T02:43:39.317Z"
},
"responseHeaders": {
"access-control-allow-credentials": "true",
"access-control-allow-origin": "https://corsproxy.io",
"content-length": "216",
"content-type": "application/json; charset=utf-8",
"date": "Wed, 03 Dec 2025 02:43:39 GMT",
"etag": "W/\"d8-hEUgU1Rhslk80+l5GAw/87Rzs44\"",
"ngrok-agent-ips": "2406:2d40:39e6:b708:799c:e6e2:504b:d3f2",
"vary": "Origin",
"x-powered-by": "Express"
}
}
}
]
}
}nfs-avn
12/03/2025, 4:51 AMVapi Support Bot
12/03/2025, 4:52 AM{{data.dayOfWeek}}, and that the prompt is updated after the tool call completes. For example:
Today is {{data.dayOfWeek}} in {{data.locationName}}.
If the prompt is set before the tool call, it won't have access to the new variable values—ensure the prompt is refreshed or re-evaluated after the tool call as described in the [dynamic variables documentation](https://docs.vapi.ai/assistants/dynamic-variables).
Source:
- [Dynamic Variables documentation](https://docs.vapi.ai/assistants/dynamic-variables)Tremix
12/04/2025, 6:59 AMkyle
12/05/2025, 12:46 AMnfs-avn
12/05/2025, 1:21 AMChiranjeet Mishra
01/06/2026, 9:47 PMnfs-avn
01/11/2026, 11:19 PMkyle
01/14/2026, 4:08 AM