Typo in Documentation for Custom Tools
# support
d
https://docs.vapi.ai/tools/custom-tools#request-format-understanding-the-tool-call-request The json is invalid json.
Copy code
"toolWithToolCallList": [
            {
                "type": "function",
                "name": "get_weather",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "location": {
                            "type": "string"
                        }
                    }
                },
                "description": "Retrieves the current weather for a specified location"
            },
            "server": {
                "url": "https://your-api-server.com/weather"
            },
            "messages": [],
            "toolCall": {
                "id": "toolu_01DTPAzUm5Gk3zxrpJ969oMF",
                "type": "function",
                "function": {
                    "name": "get_weather",
                    "parameters": {
                        "location": "San Francisco"
                    }
                }
            }
        ],
v
Hi there! 👋 I can see you've identified an issue with the JSON in the Custom Tools documentation. You're right - the JSON you shared is invalid. Looking at the provided JSON snippet, I can identify the issue. The
toolWithToolCallList
array contains an object that's improperly formatted. The problem is that the
server
property is positioned as a separate object in the array rather than being nested within the first object. Here's what's making it invalid:
Copy code
json
"toolWithToolCallList": [
    {
        "type": "function",
        "name": "get_weather",
        "parameters": {
            "type": "object",
            "properties": {
                "location": {
                    "type": "string"
                }
            }
        },
        "description": "Retrieves the current weather for a specified location"
    },
    "server": { // <-- This should be inside the previous object, not a separate array item
        "url": "https://your-api-server.com/weather"
    },
    // ...
]
According to the information I found, the correct structure for
toolWithToolCallList
should have the
server
property nested within the same object that contains the function details. Based on [examples from the Vapi documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339941602872918068), the proper format should look like: ```json "toolWithToolCallList": [ { "type": "function", "function": { "name": "get_weather", "parameters": { "type": "object", "properties": { "location": { "type": "string" } } }, "description": "Retrieves the current weather for a specified location" }, "async": false, "server": { "url": "https://your-api-server.com/weather" }, "messages": [], "toolCall": {
"id": "toolu_01DTPAzUm5Gk3zxrpJ969oMF", "type": "function", "function": { "name": "get_weather", "parameters": { "location": "San Francisco" } } } } ] ``` You can validate JSON using tools like jsonlint.com as [mentioned in Vapi's support discussions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334889631333875793). Is there anything else you'd like to know about the correct JSON format for Vapi Custom Tools? Sources: - [Discord discussion about toolWithToolCallList format](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339941602872918068) - [Discord discussion about JSON validation tools](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334889631333875793)
k
checking if this is resolved/solved for you?
Hey Don Valley Parkway, could you be more specific about the typo you're trying to mention so that I can understand and further improve on it?