hericles
05/28/2025, 7:13 PMAPI Request tool (I'm getting this warning: body.type: Invalid literal value, expected "object")
- I have once created a function tool, and it was working, but not anymore. All the conversation JSON is being sent to my API endpoints now, not only the tool args.
Is that an update or known bug?Vapi Support Bot
05/28/2025, 7:15 PMToolCall), which may be causing your issues. Make sure your endpoint expects a payload like this:
json
{
"message": {
"toolCallList": [
{
"id": "toolu_123",
"function": {
"name": "yourFunction",
"arguments": { /* tool args here */ }
}
}
]
}
}
Update your tool and endpoint logic to match this structure, and return results in the documented format. This should resolve the "Invalid literal value" error and ensure only tool arguments are sent to your API.
Reference: [Changelog Jan 22, 2025](https://docs.vapi.ai/changelog/2025/1/22), [Custom Tools Guide](https://docs.vapi.ai/tools/custom-tools)
Sources:
- [Changelog Jan 22, 2025](https://docs.vapi.ai/changelog/2025/1/22)
- [Custom Tools Guide](https://docs.vapi.ai/tools/custom-tools)hericles
05/28/2025, 7:23 PMVapi Support Bot
05/28/2025, 7:24 PMToolCall schema and the expected payload format have been in place since January 22, 2025, and there is no documented change or rollback since then. If your tool was working with a different payload last week, it may have been due to a temporary issue or undocumented change, but the current, supported format is as shown below:
json
{
"message": {
"toolCallList": [
{
"id": "toolu_123",
"function": {
"name": "yourFunction",
"arguments": { /* tool args here */ }
}
}
]
}
}
For best results, ensure your endpoint and tool configuration match this structure.
References: [Changelog Jan 22, 2025](https://docs.vapi.ai/changelog/2025/1/22), [Custom Tools Guide](https://docs.vapi.ai/tools/custom-tools)
Sources:
- [Changelog Jan 22, 2025](https://docs.vapi.ai/changelog/2025/1/22)
- [Custom Tools Guide](https://docs.vapi.ai/tools/custom-tools)
- [Vapi Changelog (May 2025)](https://docs.vapi.ai/changelog)Vapi Support Bot
05/28/2025, 10:51 PMChiranjeet Mishra
05/29/2025, 5:32 AMBlekk
05/30/2025, 12:57 AMChiranjeet Mishra
05/30/2025, 2:18 PM