Error creating a custom tool
# support
s
I tried entering the server url and all the details asked. But gives the error "Tool creation failed" (attached ss) when tried creaing the tool. https://cdn.discordapp.com/attachments/1332319207936757815/1332319208595521597/image.png?ex=6794d274&is=679380f4&hm=d3c691c2d98a18d8d9f91a5a0485156f5cf330654b546be1c3de8e810dd3be1c&
v
@Shivam Sharma I'm sorry to hear that you're experiencing issues with creating the tool. To assist you better, could you please provide me with the following details: 1. The exact server URL you are trying to enter. 2. The secret you are using, if applicable. 3. The tool ID you are attempting to create. Please ensure that all the details are entered correctly and that there are no typos or formatting errors. Once I have this information, I'll be able to help you troubleshoot the issue further.
You can continue this conversation by mentioning me in the message.
s
I get this error: { "message": [ "function.parameters.properties.status.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values", "function.parameters.properties.user_name.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values", "function.parameters.properties.order_date.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values", "function.parameters.properties.due_date.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values", "function.parameters.properties.closing_date.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values", "function.parameters.properties.property_address.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values", "function.parameters.properties.buyer_name.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values", "function.parameters.properties.seller_name.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values", "function.parameters.properties.hoa_name.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values", "function.parameters.properties.pm_name.type must be one of the following values: string, number, integer, boolean, array, object, null, or an array containing only these values" ], "error": "Bad Request", "statusCode": 400 }
My code: response = requests.post( "https://api.vapi.ai/tool", headers={ "Authorization": "Bearer 8654368c-6482-4610-97a5-4cf17e2b5f21", "Content-Type": "application/json" }, json={ "type": "function", "async": False, "function": { "name": "getOrderDetails", "description": "Fetch order details for an order by order_id provided by the user.", "parameters": { "type": "object", "properties": { "order_id": { "description": "Unique ID for the order", "type": "integer" }, "status": { "description": "Order status (e.g., COMPLETE, PENDING)" }, "user_name": { "description": "Name of the user who placed the order" }, "order_date": { "description": "Date when the order was placed" }, "due_date": { "description": "Due date for the order" }, "closing_date": { "description": "Closing date of the order" }, "property_address": { "description": "Full address of the property" }, "buyer_name": { "description": "Buyer's name (nullable)" }, "seller_name": { "description": "Seller's name" }, "hoa_name": { "description": "Name of the Homeowners Association" }, "pm_name": { "description": "Property Management company's name" } }, "required": [ "order_id" ] } }, "messages": [ { "type": "request-start", "content": "let me pull the order for you" }
@Shubham Bajaj
s
@Shivam Sharma You're getting a 400 error because some properties in your function's parameters are missing the "**type**" field. Each property should have a "type" specified, such as "**string**", "**number**", "**integer**", "**boolean**", "**array**", "**object**", or an array containing these types. By adding the "type" field to each property, your request should meet the API's requirements and resolve the error.
@Shivam Sharma Because of no response closing this ticket.
s
I used the api and it worked
Thanks man
@Shubham Bajaj The tool fails for some reason, can you please check what might be the reason. Tool ID: bbc78b73-7e17-4d59-92d5-1df1fe1b1460
"server": { "url": "https://api.inspecthoa.com/power_automate/order_details?order_id={order_id}", "timeoutSeconds": 20, "secret": "wmpaZ1a5sH", "headers": { "Authorization": "fhgfhgf", "Content-Type": "application/json", "order_id": "{{order_id}}" } }
s
@Shivam Sharma could you share the error response your getting?
s
@Shivam Sharma call id please.
s
423285be-3f71-4b38-8709-46d77de95640
s
can you help me resolve this?
s
@Shivam Sharma I cannot look into your server logs, the response is coming from server.
s
no, looks like, it is how i am passing the variables
any idea how to resolve this
@Shubham Bajaj mind connecting msn?
s
@Shivam Sharma sorry i didn't understood what do you meant by msn, but here's the payload we are sending to your server https://dump.sahilsuman.me/znsk8dxv.txt