Create a Custom Tool
# support
h
I am trying to add an api call in the "Create Custom tools" and given the POST method api url and given all the information for the payload or body(which the api call takes as the input) and whenever i am trying to add the headers of this format: -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" \ -H "X-HTTP-Method-Override: GET" \ and saving it, it is showing that the changes are saved, but while creating the tool it is showing("The tool cannot be created") and i have tried to create the tool with out the headers, then the tool is getting created , so once the tool is created i tried to save the header, then it is showing that the "changes are saved", but when i go to Phone numbers (user interaction button) and come to the tools button, the headers are getting disaapeared like there is no headers saved. how to over come this problem?
v
@HEMANTH It sounds like you're encountering an issue with saving the headers for your API call within the "Create Custom tools" section. To overcome this problem, let's ensure that the headers are formatted correctly and that they adhere to the expected structure of the tool configuration. Here are a few steps you can take to troubleshoot and resolve the issue: 1. Check Header Format: Ensure that the headers are formatted correctly in the tool configuration. Headers should be provided in a key-value pair format that the tool expects. 2. Validate Authorization Token: Verify that the
YOUR_ACCESS_TOKEN
placeholder is replaced with a valid access token. 3. Content-Type Header: Confirm that the
Content-Type
header is set to the correct value that the API expects. In your case, it's
application/vnd.amadeus+json
. 4. Method Override Header: The
X-HTTP-Method-Override
header is used to override the HTTP method. Make sure that this is necessary for your API call and that the API supports this header. 5. Save and Test: After ensuring the headers are correctly formatted, save the tool configuration again and test it to see if the headers persist. 6. Check Documentation: Review the documentation for the tool creation to ensure that there are no additional requirements or limitations regarding headers. 7. Contact Support: If the issue persists after following these steps, it may be a bug or a limitation within the tool's configuration system. In this case, please reach out to the support team for further assistance. If you need any specific help with the header format or any other configuration, please provide more details, and I'll be happy to assist you further.
You can continue this conversation by mentioning me in the message.
h
I have verified all the details and put the correct accestoken , Content-Type, X-HTTP-Method-Override, but still the headers are not updated
i am getting this error, while calling the tool
s
@HEMANTH could you share the call id so i can take a look and also loom video of failing to create headers.
h
Call id of the "Phone Outbound" : "407abe52-291c-4c55-9b26-b82dd309a009"
s
You need to return the response in the following format: a string without any line breaks.
Copy code
json
{
    "results": [
        {
            "toolCallId": "X",
            "result": "Y"
        }
    ]
}
Replace
Y
with your result containing multiple items that you want the model to access. Make sure
Y
is a string without any line breaks. I noticed your server is returning a 4xx status code, which indicates an error on your end. Could you check your logs? If it's related to headers, please share a Loom video showing where you're unable to add the headers so I can investigate. https://cdn.discordapp.com/attachments/1331222586436227104/1331500519650234478/Screenshot_2025-01-22_at_11.14.34.png?ex=6791d7fd&is=6790867d&hm=39014eed1605b53f4c7f85a27d61f9bca068cb76471b9371ce754350e4723b8c&
the header is getting disappered when i save it and go to others and come back to my tool
s
@HEMANTH Can you try doing a hard refresh? Your headers are saved, it's just that the UI state was out of sync with the server state.
h
i have tried it, but its the same
4 Views