DonValleyParkway
04/12/2025, 5:00 AM"toolWithToolCallList": [
{
"type": "function",
"name": "get_weather",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string"
}
}
},
"description": "Retrieves the current weather for a specified location"
},
"server": {
"url": "https://your-api-server.com/weather"
},
"messages": [],
"toolCall": {
"id": "toolu_01DTPAzUm5Gk3zxrpJ969oMF",
"type": "function",
"function": {
"name": "get_weather",
"parameters": {
"location": "San Francisco"
}
}
}
],
Vapi Support Bot
04/12/2025, 5:01 AMtoolWithToolCallList
array contains an object that's improperly formatted. The problem is that the server
property is positioned as a separate object in the array rather than being nested within the first object.
Here's what's making it invalid:
json
"toolWithToolCallList": [
{
"type": "function",
"name": "get_weather",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string"
}
}
},
"description": "Retrieves the current weather for a specified location"
},
"server": { // <-- This should be inside the previous object, not a separate array item
"url": "https://your-api-server.com/weather"
},
// ...
]
According to the information I found, the correct structure for toolWithToolCallList
should have the server
property nested within the same object that contains the function details. Based on [examples from the Vapi documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339941602872918068), the proper format should look like:
```json
"toolWithToolCallList": [
{
"type": "function",
"function": {
"name": "get_weather",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string"
}
}
},
"description": "Retrieves the current weather for a specified location"
},
"async": false,
"server": {
"url": "https://your-api-server.com/weather"
},
"messages": [],
"toolCall": {Vapi Support Bot
04/12/2025, 5:01 AMKyle Brunker
04/12/2025, 7:34 AMKyle Brunker
04/14/2025, 5:56 AM