Need to know new tools calls response format.
# support
s
Need to know new tools calls response format. Old one was {result:"result string"} Now I am using tools, What is the response format for that??? please help. I dont find it in vapi docs
v
message has been deleted
@SajithSPY Certainly! The new response format for tool calls in VAPI has been updated to provide more structured information. When your server receives an HTTP request for a tool call and processes it, you should send back a response in the following JSON format:
Copy code
json
{
    "results": [
        {
            "toolCallId": "X",
            "result": "Y"
        }
    ]
}
In this format: -
results
is an array that can contain multiple result objects. - Each result object within the array has two properties: - `toolCallId`: This is a unique identifier for the tool call. - `result`: This is the result of the tool call, which can be a string or any other JSON-compatible data structure depending on the tool's output. This new format allows for better tracking and handling of multiple tool calls and their respective results. If you need further clarification or assistance, please don't hesitate to ask!
You can continue this conversation by mentioning me in the message.
@SajithSPY Sweet. Have a great day!
@Vapi Sweet. Have a great day!
10 Views