slic.c
08/08/2025, 5:22 PMAI Evy
08/08/2025, 5:22 PMAI Evy
08/08/2025, 5:22 PMtype field in your custom tool configuration [(1) ]() . The correct type for custom functions should be "custom_function", not "custom" .
According to the documentation, when creating a custom function, the structure should be :
json
{
"type": "custom_function",
"name": "do_my_custom_api",
"parameters": {
"type": "object",
"properties": {
"foo": { "type": "string" }
},
"required": ["foo"]
}
}
Your request body should use "type": "custom_function" instead of "type": "custom" . The error is occurring because the API expects one of the allowed values: end_call, transfer_call, check_availability_cal, book_appointment_cal, press_digit, or custom_function .
Update your request to:
json
{
"general_tools": [{
"type": "custom_function",
"name": "testtool",
"description": "this is a test too",
"url": "<https://api.example.com%22,>
"speak_during_execution": false,
"speak_after_execution": false,
"method": "GET",
"headers": {},
"query_params": {},
"parameters": {},
"response_variables": {},
"execution_message_description": "",
"timeout_ms": 12000
}]
}
This should resolve the validation error you're encountering .AI Evy
08/08/2025, 5:22 PMAI Evy
08/08/2025, 5:22 PMslic.c
08/08/2025, 5:29 PMAI Evy
08/08/2025, 5:29 PMAI Evy
08/08/2025, 5:29 PMparameters field must follow a specific JSON schema format [(1) ]() . Your current "parameters": {} is invalid. According to the documentation, it should be structured like this :
json
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city to get weather for"
}
},
"required": ["city"]
}
2. **GET requests with parameters**: The documentation shows that parameters are only available for POST, PATCH and PUT requests [(1) ]() [(2) ]() . Since you're using a GET request, you should either:
- Switch to POST method and use the parameters field
- Or use query parameters instead of the parameters field for GET requests
3. **Common validation issue**: One frequent mistake mentioned in the documentation is not adding "type": "object" to the top level of the JSON schema [(1) ]() .
Here's a corrected version for a GET request with query parameters:
json
{
"general_tools": [{
"type": "custom_function",
"name": "testtool",
"description": "this is a test tool",
"url": "<https://api.example.com%22,>
"method": "GET",
"query_params": {
"city": "{{city_name}}"
},
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}]
}
Or for a POST request with parameters:AI Evy
08/08/2025, 5:29 PMjson
{
"general_tools": [{
"type": "custom_function",
"name": "testtool",
"description": "this is a test tool",
"url": "<https://api.example.com%22,>
"method": "POST",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city name"
}
},
"required": ["city"]
}
}]
}
The validation error suggests the API is checking for required properties that match specific tool types, so ensuring the parameters field follows the correct schema format should resolve the issue [(3) ]() .AI Evy
08/08/2025, 5:29 PMAI Evy
08/08/2025, 5:29 PMslic.c
08/08/2025, 5:38 PMAI Evy
08/08/2025, 5:38 PMAI Evy
08/08/2025, 5:38 PMgeneral_tools is "custom_function" not "custom" [(1) ]() . However, since you're still getting the same error, let me provide the exact structure from the documentation.
For custom functions in Single/Multi Prompt agents, the structure should be [(2) ]() :
json
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city of the weather"
}
},
"required": [
"city"
]
}
The documentation emphasizes that a common mistake is not adding "type": "object" to the top level of the JSON schema , [(3) ]() .
For your specific case, try this structure:
json
{
"general_tools": [{
"type": "custom_function",
"name": "testtool",
"description": "this is a test tool",
"endpoint": "<https://api.example.com%22,>
"method": "GET",
"headers": {},
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}]
}
Note that I changed "url" to "endpoint" based on the Discord example [(1) ]() , and ensured the parameters field has the proper JSON schema structure with "type": "object" at the top level [(2) ]() , [(3) ]() .
If this still doesn't work, the issue might be with the API endpoint you're calling or there could be a validation bug. You may want to contact support directly.AI Evy
08/08/2025, 5:38 PMAI Evy
08/08/2025, 5:38 PMslic.c
08/08/2025, 6:00 PMAI Evy
08/08/2025, 6:00 PMAI Evy
08/08/2025, 6:00 PM"custom_function" rather than "custom" . The example provided shows:
json
{
"general_tools": [
{
"type": "custom_function",
"name": "get_user_info",
"description": "Fetch user info",
"endpoint": "<https://api.example.com/user%22,>
"method": "POST",
"headers": {},
"parameters": {
"type": "object",
"properties": {
"user_id": { "type": "string" }
},
"required": ["user_id"]
}
}
]
}
However, since you're still experiencing issues even after these corrections, and you've mentioned that the endpoint has been updated with the documentation being out of date, I'd recommend:
1. Visit [Contact Sales]()
2. Visit [)
The team can provide direct technical assistance with the current API implementation that may differ from the published documentation.AI Evy
08/08/2025, 6:00 PMAI Evy
08/08/2025, 6:00 PM