Help setting up tools please
# support
j
Hi, I am trying to convert my old functions into the new Tools. I've set the tool's server url as a webhook.site for testing. Then when I call my AI agent and it performs a tool, it sends a GET request to the webhook.site? https://cdn.discordapp.com/attachments/1240351899149144135/1240351899346145372/image.png?ex=66463f39&is=6644edb9&hm=7a32cc258d9c4f07b6316e5ba035a3d3af13a79ca4ddb68e17b0bf3925a0e0a5&
v
Hi @Jotham, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Tools Calling]() * [Glossary]() * [Server URLs]() * [Update Assistant]() -----------------------------
### Answer When setting up tools with Vapi, your assistant can perform various actions by invoking functions defined by you. The server URL you've set for the tools should handle these function calls. However, the function calls are made using HTTP POST requests, not GET requests [(1)]() [(2)]() [(3)]() . Here's an example of a tool configuration that fetches the weather for a given location:
Copy code
json
{
  "type": "function",
  "messages": [
    {
      "type": "request-start",
      "content": "Checking the weather forecast. Please wait..."
    },
    {
      "type": "request-complete",
      "content": "The weather in location is"
    },
    {
      "type": "request-failed",
      "content": "I couldn't get the weather information right now."
    },
    {
      "type": "request-response-delayed",
      "content": "It appears there is some delay in communication with the weather API."
    }
  ],
  "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-weather-api.com/weather"
  }
}
In this configuration: 1. **Function Name and Parameters**: Define the function name and parameters it accepts. 2. **Messages**: Customize the messages for different stages of the function call. 3. **Server URL**: Set the server URL where the POST request will be sent. Make sure your server at
webhook.site
is set up to handle POST requests and not GET requests.
Got it. Tagging @User for additional help.
s
This is pretty strange. Is it happening properly? Also, could you please read this documentation https://docs.vapi.ai/tools-calling and if you face any issue, could you please pinpoint it so that I can improve the documentation as well.
s
Are you sure it is coming from us cause if you see the user-agent then it is from Slack not Vapi.
j
yeah everytime the assistant says "one sec" It comes through
so weird
s
Sent to the team.
2 Views