Failed to make API Calls from tools
# support
h
Hey guys, I'm trying to make some API Calls with tool calling, but I'm facing some issues: - I can't create an
API 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?
v
It looks like Vapi recently migrated to a new tool calling schema (
ToolCall
), which may be causing your issues. Make sure your endpoint expects a payload like this:
Copy code
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)
h
How accurate is that? I was using this (working) last week. This changelog is from Jan 22
v
The information provided by the support bot is accurate according to the latest official documentation and changelogs. The
ToolCall
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:
Copy code
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)
v
Message marked as helpful by @hericles! 🎉
c
Hey, really sorry for your experience. If possible, could you record a loom video describing this error/behavior or inconsistency in the dashboard with the steps to reproduce it? That way, I can share this with my team, and we'll take a look. We'll even try to reproduce the same so we can fix it for you. Also, I'll request you to share your workflow ID.
b
Hi I also need help with this - The API request Tool wont allow me to save, I've tried the exact same configuiration on 11labs and it works, not sure why it doesnt work on VAPI
c
Hey @hericles and @Blekk can you share a loom video so I can understand what's going wrong for you?
2 Views