Matt
04/09/2025, 12:43 PMInvalid JSON Schema: {
"_errors": [],
"type": {
"_errors": [
"Invalid literal value, expected \"object\""
]
},
"properties": {
"_errors": [
"Required"
]
}
}
Vapi Support Bot
04/09/2025, 12:45 PMtransferCall
tool, you need to structure your JSON schema correctly. The top-level type
should be "transferCall", but within the parameters
object, the type
should be "object":
json
{
"type": "transferCall",
"destinations": [
{
"type": "number",
"number": "+16054440129"
}
],
"function": {
"name": "transferCall",
"description": "Use this function to transfer the call to the specified destination.",
"parameters": {
"type": "object", // This is the important part - must be "object"
"properties": { // This field is required when type is "object"
"destination": {
"type": "string",
"enum": [
"+16054440129"
],
"description": "The destination to transfer the call to."
}
},
"required": [
"destination"
],
"additionalProperties": false // Recommended for security
}
}
}
According to the [documentation I found](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1332319207936757815), each property in the JSON schema should have a "type" specified (like "string", "number", "boolean", etc.), and when the type
is set to "object", the properties
field must be defined.
To debug this further, you can:
1. Use a JSON validator like jsonlint.com to check for formatting issues
2. Make sure all required fields are present in your schema
3. Ensure you're following the model-specific requirements (some models like Anthropic require keys to be alphanumeric only)Vapi Support Bot
04/09/2025, 12:45 PMKings Big
04/11/2025, 7:03 AM