BuckAMayzing
07/11/2025, 12:13 AMModel request failed (attempt #1, reason: Invalid 'tools[2].function.name': empty string. Expected a string with minimum length 1, but got an empty string instead.)
Here's the thing: I haven't changed the MCP server between VAPI tool updates - the tool names are not missing; they're named. I've gone to the simplest version of the tool update I can:
type: "mcp",
server: {
url: process.env.MCP_SERVER_URL!,
headers: {
"x-organization-id": organizationId,
"x-api-token": mcpToken,
},
},
I'm unable to determine the cause of the error, but it does seem to be somehow related to the client.tools.create call, and what is being fed into it. Sometimes everything's fine, sometimes it's not. Sometimes it works on create, but is resolved with an update, sometimes the other way around. It's permanent until I change some config around and retry, but it's a toss-up as to whether that will work. Logs on my MCP server show valid requests and responses with tool names in the fields.
It's worth noting that this could be an off-by-one issue: I only have two tools on the MCP server right now, so tools[2] shouldn't be a valid index. Earlier, when I had four tools, it was throwing an error with tools[4]. Unless the indexing is 1-based, this is incorrect.
Any insight into what might be causing this? It's preventing our product launch. You can see a call id at c267e1fa-b92b-4948-99d5-efb377bb7c37.BuckAMayzing
07/11/2025, 12:29 AMd7eda0ae-c488-4185-91a5-1d01a7891833. Nothing changed in the tool. I did add a backoff plan, but subsequent tests with the same backoff plan object (after a PATCH) failed.BuckAMayzing
07/11/2025, 2:50 AManalysisPlan when creating/updating an agent.
If I don't include exactly \n\nJson Schema:\n{{schema}}\n\nOnly respond with the JSON. at the end of my custom prompt and exactly this second message:
{
role: "user",
content: "Here is the transcript:\n\n{{transcript}}\n\n. Here is the ended reason of the call:\n\n{{endedReason}}\n\n",
},
Then any calls will immediately crash with the error that I opened the post with. Including these pieces allows my assistant to respond and prevents crashes. Both pieces of data are required. If there's a space between the newlines and the word "Json", the call will crash. If there is a missing character, the call will crash
I'm assuming there's some side effect or bug in the merge logic. I was able to find this by diffing the fetch from /assistant/[id] before and after saving through the VAPI UI.BuckAMayzing
07/11/2025, 3:55 PMChiranjeet Mishra
07/12/2025, 8:33 PMChiranjeet Mishra
07/14/2025, 2:37 PMBuckAMayzing
07/14/2025, 5:03 PMBuckAMayzing
07/14/2025, 11:23 PMassistant.server.timeoutSeconds is not specified. I get a 200 on the call, but it does crash at call time.Chiranjeet Mishra
07/15/2025, 10:46 PM