VAPI running GET requests instead of POST to my cu...
# support
c
I've added a custom tool to one of my assistants. I've validated the tool object it's all correct. The only issue is it keeps running GET requests instead of POST? I assumed all requests were POST & cant see any configs to update this. Has anyone else ran into that? https://cdn.discordapp.com/attachments/1240883625717927936/1240883625885569054/Screenshot_2024-05-17_at_12.26.37_pm.png?ex=66482e6e&is=6646dcee&hm=050242b22c26de0468f8687823ea16371de98222576e6910a96e6426f698aa47&
v
Hi @Connor Davis | Outbox AI, 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**: * [Get Assistant]() * [Frequently Asked Questions]() * [Create Assistant]() * [Tools Calling]() -----------------------------
### Answer It sounds like there might be an issue with how the tool is configured within your Vapi assistant. Vapi should indeed use POST requests for tools unless differently specified within the tool's configuration. To troubleshoot this, ensure that your server is set to handle POST requests and that the tool configuration on Vapi matches the expectations. You might want to double-check the details regarding the server settings and how you have configured the tool within Vapi. The documentation on [Tools Calling]() might help clarify how these requests should be set up and handled [(1)]() . If everything seems correct and the issue persists, it might be a specific case that needs deeper investigation. Reviewing the server logs to confirm the type of requests received could provide further insights.
Got it. Tagging @User for additional help.
c
I think it may be because im using tools instead of functions. When using functions the call works perfectly but I've recently migrated to tools & the call is always a GET request instead of a POST. Here's the object for the tool im trying to use:
Copy code
c
"tools": [
                {
                    "type": "function",
                    "async": false,
                    "function": {
                        "name": "book_appointment",
                        "description": "Book an appointment in with the CEO",
                        "parameters": {
                            "type": "object",
                            "properties": {
                                "start_time": {
                                    "type": "string",
                                    "description": "The start time of the booking you\"d like to make in ISO 8601 format."
                                },
                                "timezone": {
                                    "type": "string",
                                    "description": "The timezone of the start time that you\"d like to book in."
                                }
                            }
                        },
                        "required": ["start_time", "timezone"]
                    },
                    "server": {
                        "url": "https://back-dev.outboxsolutions.com.au/agent/tool/run/f3cc160f-29c5-487b-87a8-60a902b60c5d/",
                        "secret": "083dc549-eb0a-4e51-a207-7fd1f56b056d"
                    }
                }
            ]
j
can you share the full GET request please. I think we have the same issue. for some reason Tools is sending... a slackbot?! https://cdn.discordapp.com/attachments/1240883625717927936/1240990947362471936/image.png?ex=66489262&is=664740e2&hm=c06d6e85e6eced93db19ffd0fa92514801da1beef5cc57ce7f489a70d9280f41&
c
Yep I’m getting the exact same thing
j
sooo strange @Sahil
c
I’ve just reverted back to functions for the time being which seem to be working, will switch back to tools once this has been resolved
j
I think I've just found my error. Can you tell me if you include "tool_calls" in your serverMessages?
Copy code
"serverMessages": [
          "end-of-call-report",
          "tool-calls"
      ],
c
Ahhhhh I did not
Thanks so much man! I’ll give this a try now
j
no prob! Hopefully works for you, I've spent 2 days wondering wtf was going on lol
c
Yeah me too lol, appreciate ya
v
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.
s
@Jotham what's the issue?
j
I didn't include "tool-calls" in the serverMessages. Without including tool-calls, it sends a GET request with a slackbot? Not sure why
s
Ah, I see. I will check it from my side as well.
Thanks!
e
created this tool {"id":"7fa7c72e-197f-4075-9c3b-4480ed8531cd","createdAt":"2025-03-03T23:51:25.838Z","updatedAt":"2025-03-03T23:51:25.838Z","type":"function","function":{"name":"updaterds","description":"Stores or updates a value in Redis.","parameters":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"messages":[{"type":"request-start","content":"Updating Redis data..."},{"type":"request-complete","content":"Redis updated successfully!"},{"type":"request-failed","content":"Failed to update Redis."}],"orgId":"adeacfd3-6364-4943-825f-b24433b25ed4","server":{"url":"https://users.dedyn.io:8000/update-redis","timeoutSeconds":20,"headers":{"Content-Type":"application/json","X-HTTP-Method-Override":"PUT"}},"async":true}% but it is failing 36.144.230:59591 - "HEAD / HTTP/1.1" 404 Not Found INFO: 49.36.144.230:59599 - "POST /update-redis HTTP/1.1" 200 OK INFO: 49.36.144.230:59601 - "POST /update-redis HTTP/1.1" 200 OK INFO: 18.206.35.81:48536 - "GET /update-redis HTTP/1.1" 405 Method Not Allowed INFO: 18.206.35.81:57110 - "GET / HTTP/1.1" 404 Not Found INFO: 51.81.110.53:48093 - "GET / HTTP/1.1" 404 Not Found WARNING: Invalid HTTP request rec
@User
Redis updated successfully! WARNING: Invalid HTTP request received. WARNING: Invalid HTTP request received. INFO: 49.36.144.230:60180 - "GET /get-redis/username HTTP/1.1" 200 OK INFO: 49.36.144.230:60181 - "GET /get-redis/name HTTP/1.1" 404 Not Found INFO: 49.36.144.230:60187 - "GET /get-redis/key HTTP/1.1" 404 Not Found WARNING: Invalid HTTP request received. WARNING: Invalid HTTP request received. WARNING: Invalid HTTP request received. WARNING: Invalid HTTP request received.
@Sahil
@Connor Davis | Outbox AI
The Header is not updated { "id": "7fa7c72e-197f-4075-9c3b-4480ed8531cd", "createdAt": "2025-03-03T23:51:25.838Z", "updatedAt": "2025-03-03T23:52:01.187Z", "type": "function", "function": { "name": "updaterds", "async": false, "description": "Stores or updates a value in Redis.", "parameters": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } } } }, "messages": [ { "type": "request-start", "content": "Updating Redis data..." }, { "role": "assistant", "type": "request-complete", "content": "Redis updated successfully!" }, { "type": "request-failed", "content": "Failed to update Redis." } ], "orgId": "adeacfd3-6364-4943-825f-b24433b25ed4", "server": { "url": "https://users.dedyn.io:8000/update-redis", "timeoutSeconds": 20 }, "async": true
the response in cli "description": "Stores or updates a value in Redis." }, "messages": [ { "type": "request-start", "content": "Updating Redis data..." }, { "type": "request-complete", "content": "Redis updated successfully!" }, { "type": "request-failed", "content": "Failed to update Redis." } ], "server": { "url": "https://users.dedyn.io:8000/update-redis", <.... {"id":"7fa7c72e-197f-4075-9c3b-4480ed8531cd","createdAt":"2025-03-03T23:51:25.838Z","updatedAt":"2025-03-03T23:51:25.838Z","type":"function","function":{"name":"updaterds","description":"Stores or updates a value in Redis.","parameters":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"messages":[{"type":"request-start","content":"Updating Redis data..."},{"type":"request-complete","content":"Redis updated successfully!"},{"type":"request-failed","content":"Failed to update Redis."}],"orgId":"adeacfd3-6364-4943-825f-b24433b25ed4","server":{"url":"https://users.dedyn.io:8000/update-redis","timeoutSeconds":20,"headers":{"Content-Type":"application/json","X-HTTP-Method-Override":"PUT"}},"async":true}%
@Shubham Bajaj
@Sahil
@Vapi
redis/Vishal {"detail":"Key not found in Redis"}% rishabhbhanot@Rishabhs-MacBook-Pro ~ % curl -X GET http://206.1.53.26:8000/get-redis/Rishab {"detail":"Key not found in Redis"}% rishabhbhanot@Rishabhs-MacBook-Pro ~ % { "role": "tool_calls", "time": 1741048963301, "message": "", "toolCalls": [ { "id": "call_p8ny", "type": "function", "function": { "name": "updaterds", "arguments": "{\"key\": \"Rishab\", \"value\": \"Thing\"}" } } ], "secondsFromStart": 52.269 }
4 Views