json
05/03/2025, 10:10 PM{
"role": "tool_calls",
"time": 1746309515839,
"message": "",
"toolCalls": [
{
"id": "1746309515838-9g1zeofn3",
"type": "function",
"function": {
"name": "onboarding_name",
"arguments": "{\"firstName\": \"Jason\", \"sessionId\": \"9ebd66bc-d6cd-4ffc-bee6-2a152c638892\"}"
}
}
],
"secondsFromStart": 14.17
}
• Recieved Response:
{
"role": "tool_calls",
"time": 1746309515839,
"message": "",
"toolCalls": [
{
"id": "1746309515838-9g1zeofn3",
"type": "function",
"function": {
"name": "onboarding_name",
"arguments": "{\"firstName\": \"Jason\", \"sessionId\": \"789\"}"
}
}
],
"secondsFromStart": 14.17
}
Tool Config:
{
"id": "c51c3cbc-720c-4665-8e41-02213a910689",
"createdAt": "2025-05-03T14:21:24.224Z",
"updatedAt": "2025-05-03T22:01:25.388Z",
"type": "function",
"function": {
"name": "onboarding_name",
"strict": false,
"description": "passes the user's name and sessionId to the homepage",
"parameters": {
"type": "object",
"properties": {
"firstName": {
"description": "User's first name",
"type": "string"
},
"sessionId": {
"description": "Session identifier",
"type": "string"
}
},
"required": [
"firstName"
]
}
},
"messages": [
{
"type": "request-start",
"content": "",
"blocking": false
}
],
"orgId": "7d9d27d3-e3a7-4f11-b129-81f322f27766",
"server": {
"url": "https://mitissa.vercel.app/api/webhook",
"headers": {}
},
"async": false
}Vapi Support Bot
05/03/2025, 10:12 PMassistantOverrides parameter with variableValues when initializing your Vapi instance:
javascript
vapiInstance = vapiSDK.run({
apiKey: apiKey,
assistant: assistant,
config: buttonConfig,
assistantOverrides: {
variableValues: {
sessionId: "9ebd66bc-d6cd-4ffc-bee6-2a152c638892"
}
}
});
This explicitly passes your sessionId as a variable that can be accessed by your tool function.
Source:
- [Discord discussion about passing data to webhooks](https://discord.com/channels/1211482211119796234/1339495894801711186)json
05/03/2025, 10:27 PMjson
05/03/2025, 10:53 PMVapi Support Bot
05/03/2025, 10:55 PMjavascript
// Also verify the variable name matches exactly in both places
console.log("Debugging sessionId variable:", {
providedInOverrides: "9ebd66bc-d6cd-4ffc-bee6-2a152c638892",
receivedInTool: "789" // The random value you're seeing
});
If the issue persists, contact Vapi support with your Call ID for in-depth investigation.
Source:
- [Discord discussion about debugging tool calls](https://discord.com/channels/1211482211119796234/1340404440892444742)json
05/04/2025, 3:46 AMChiranjeet Mishra
05/05/2025, 4:13 PMjson
05/07/2025, 10:42 PMChiranjeet Mishra
05/08/2025, 2:44 AM