Request Body for Tool Not Generating
# support
p
Have this exact issue: https://vapi.ai/community/m/1402696342056210452 The request shows as {} no matter what I do, and Im not able to test my tool. And this is probably why my tool is not working. I tried everything. Please help.
v
Try adding
"strict": true
to your tool configuration and ensure your
parameters
object includes a
required
array listing all required parameter names.
This helps catch schema validation errors that can cause the request body to be
{}
. Here’s an example:
Copy code
json
{
  "name": "get_weather",
  "description": "Get current weather for a city",
  "parameters": {
    "type": "object",
    "properties": {
      "city": { "type": "string", "description": "City name" }
    },
    "required": ["city"]
  },
  "strict": true
}
This should resolve most issues with the request body not generating properly. For more, see the [custom tools troubleshooting guide](https://docs.vapi.ai/tools/custom-tools-troubleshooting). Source: - [Custom tools troubleshooting](https://docs.vapi.ai/tools/custom-tools-troubleshooting)
p
Invalid JSON Schema: { "_errors": [], "type": { "_errors": [ "Invalid literal value, expected \"object\"" ] }, "properties": { "_errors": [ "Required" ] } }
This is what i get when i paste your snippet.
A lot of people have this issue. why does the team not help with this? https://vapi.ai/community/m/1400473832976027728
c
Hey Preben, Sorry to hear about the issues you are experiencing with the tool testing. We suggest using an actual call with your assistant and tool to get accurate results for your tool since the testing may not work as expected. Our team is working on fixing this, but for now the best workaround is executing a test call with your assistant and tool and checking the logs. Alternatively you can use an API tool like postman to call your webhook like the tool would to see how your server would respond.