adverse-sapphire
adverse-sapphire3mo ago

Function not adhering by strict parameters

Hi there! I'm using a function call in vapi with make.com. However, even though my function has strict parameter validation on, and the 2 parameters I need to send the email are set as required, the function is sending make.com a bad payload with no arguments. How do I fix this?
6 Replies
Vapi
Vapi3mo ago
To ensure Vapi enforces strict parameter validation, make sure your tool's parameters object includes a "required" array listing all mandatory fields. For example:
"parameters": {
"type": "object",
"properties": {
"to": { "type": "string" },
"body": { "type": "string" }
},
"required": ["to", "body"]
}
"parameters": {
"type": "object",
"properties": {
"to": { "type": "string" },
"body": { "type": "string" }
},
"required": ["to", "body"]
}
Double-check that your assistant's prompt and tool definition match, and that the payload sent to make.com includes these fields. This should prevent empty payloads from being sent if parameters are missing. Source: - Vapi Custom Tools Documentation
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
adverse-sapphire
adverse-sapphireOP3mo ago
It does have a required array, but the payload sent to make.com keeps being sent with no arguments
No description
adverse-sapphire
adverse-sapphireOP3mo ago
No description
eastern-cyan
eastern-cyan3mo ago
Ensure your webhook parses message.functionCall.parameters correctly, then responds with a JSON body like { "results": [{ "toolCallId": "...", "result": "OK" }] }; otherwise, Vapi treats it as a failed call and sends empty arguments..
adverse-sapphire
adverse-sapphireOP3mo ago
My webhook does return a valid JSON body with the toolCallId and "OK", so I don't think that's the issue. The problem is actually with the first function call, Vapi is triggering it without the required arguments in the first place, not as a retry or failed response. Any idea why that's happening even with required fields set?
Shubham Bajaj
Shubham Bajaj3mo ago
Hey! To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead
This would really help us figure out what went wrong!

Did you find this page helpful?