#When creating a tool via web UI I get an error. If i switch to tool it says: ```Please fix the foll

1 messages · Page 1 of 1 (latest)

inland canyonBOT
#
AI-generated Answer for damuz91

The error indicates that the tool creation process expects a valid request_body_schema to be defined, even if your tool does not require parameters. This schema is mandatory for validation purposes, and you need to provide it in the correct format.

To resolve this issue, you can define an empty request_body_schema with the required fields set appropriately. Here's an example of how you can structure it:

"api_schema": {
  "request_body_schema": {
    "id": "example_id",
    "type": "object",
    "description": "This is an empty schema as no parameters are required.",
    "required": [],
    "properties": {}
  }
}

Explanation of the fields:

  • id: A unique identifier for the schema.
  • type: Should always be "object", even if no parameters are required.
  • description: A brief description of the schema.
  • required: An empty array if no parameters are required.
  • properties: An empty object since there are no parameters.

By including this minimal schema, you satisfy the validation requirements while indicating that no parameters are needed for your tool. If the issue persists, double-check the tool configuration or provide more details about your setup.

celest gate
#

Ok, i have used what you suggest, i am sending this:

{
"type": "webhook",
"name": "get_access_code",
"description": "Retrieves access codes for the caller's storage units. Looks up the caller by phone number and returns associated access codes formatted for audio clarity",
"api_schema": {
"url": "https://1825-190-68-195-226.ngrok-free.app/voice/phone_ai/execute_function",
"method": "POST",
"path_params_schema": [],
"query_params_schema": [],
"request_body_schema": {
"id": "gate_access_code",
"type": "object",
"description": "This is an empty schema as no parameters are required.",
"required": [],
"properties": {}
},
"request_headers": []
},
"response_timeout_secs": 20,
"dynamic_variables": {
"dynamic_variable_placeholders": {}
}
}

Now I am getting this error:
Please fix the following validation errors:
• api_schema.request_body_schema.required: Expected boolean, received array
• api_schema.request_body_schema.properties: Expected array, received object

inland canyonBOT
#
AI-generated Answer for damuz91

The error indicates that the required and properties fields in your request_body_schema are incorrectly formatted. Here's how you can fix it:

  1. required Field: It should be a boolean (true or false), not an array. Since your tool does not require any parameters, set it to false.

  2. properties Field: It should be an array, not an object. If no properties are required, you can leave it as an empty array.

Here’s the corrected JSON:

{
  "type": "webhook",
  "name": "get_access_code",
  "description": "Retrieves access codes for the caller's storage units. Looks up the caller by phone number and returns associated access codes formatted for audio clarity",
  "api_schema": {
    "url": "https://1825-190-68-195-226.ngrok-free.app/voice/phone_ai/execute_function",
    "method": "POST",
    "path_params_schema": [],
    "query_params_schema": [],
    "request_body_schema": {
      "id": "gate_access_code",
      "type": "object",
      "description": "This is an empty schema as no parameters are required.",
      "required": false,
      "properties": []
    },
    "request_headers": []
  },
  "response_timeout_secs": 20,
  "dynamic_variables": {
    "dynamic_variable_placeholders": {}
  }
}

This should resolve the validation errors. Let me know if you encounter further issues!

celest gate
#

I have used that JSON but now i get:

Please fix the following validation errors:
• api_schema.request_body_schema.properties: Object must have at least one property

inland canyonBOT
#
AI-generated Answer for damuz91

The error indicates that the properties field in your request_body_schema must contain at least one property, even if your tool does not require parameters. To resolve this, you can define a placeholder property in the properties object. For example, you can add a dummy property with a default value that won't affect your tool's functionality.

Here’s an updated version of your JSON:

{
  "type": "webhook",
  "name": "get_access_code",
  "description": "Retrieves access codes for the caller's storage units. Looks up the caller by phone number and returns associated access codes formatted for audio clarity",
  "api_schema": {
    "url": "https://1825-190-68-195-226.ngrok-free.app/voice/phone_ai/execute_function",
    "method": "POST",
    "path_params_schema": [],
    "query_params_schema": [],
    "request_body_schema": {
      "id": "gate_access_code",
      "type": "object",
      "description": "This schema includes a placeholder property as no parameters are required.",
      "required": ["placeholder"],
      "properties": {
        "placeholder": {
          "type": "string",
          "description": "A placeholder property to satisfy validation requirements."
        }
      }
    },
    "request_headers": []
  },
  "response_timeout_secs": 20,
  "dynamic_variables": {
    "dynamic_variable_placeholders": {}
  }
}

Key Changes:

  1. properties: Added a placeholder property with a type of string and a description.
  2. required: Included placeholder in the required array to meet validation requirements.

This should resolve the validation errors while keeping the schema functional. If your tool truly does not require any parameters, you can simply ignore the placeholder property in your implementation.

celest gate
#

Now that returns:

Please fix the following validation errors:
• api_schema.request_body_schema.required: Expected boolean, received array
• api_schema.request_body_schema.properties: Expected array, received object

inland canyonBOT
#
AI-generated Answer for damuz91

The error indicates that the request_body_schema.required and request_body_schema.properties fields are incorrectly formatted. Here's how you can fix the JSON:

  1. required Field: This should be a boolean (true or false) rather than an array.
  2. properties Field: This should be an array, not an object. If your tool does not require any parameters, you can leave the array empty.

Here’s the corrected JSON:

{
  "type": "webhook",
  "name": "get_access_code",
  "description": "Retrieves access codes for the caller's storage units. Looks up the caller by phone number and returns associated access codes formatted for audio clarity",
  "api_schema": {
    "url": "https://1825-190-68-195-226.ngrok-free.app/voice/phone_ai/execute_function",
    "method": "POST",
    "path_params_schema": [],
    "query_params_schema": [],
    "request_body_schema": {
      "id": "gate_access_code",
      "type": "object",
      "description": "This is an empty schema as no parameters are required.",
      "required": false,
      "properties": []
    },
    "request_headers": []
  },
  "response_timeout_secs": 20,
  "dynamic_variables": {
    "dynamic_variable_placeholders": {}
  }
}

Key Changes:

  • required is set to false (boolean).
  • properties is an empty array ([]).

This should resolve the validation errors. If the issue persists, double-check the documentation or schema requirements for your tool creation process.

celest gate
#

now the error says:

Please fix the following validation errors:
• api_schema.request_body_schema.properties: Object must have at least one property

inland canyonBOT
#
AI-generated Answer for damuz91

The error indicates that the properties field in your request_body_schema must contain at least one property. Even if your tool does not require parameters, the schema still expects a valid structure with at least one defined property.

To resolve this, you can define a placeholder property in the properties object. For example:

{
  "type": "webhook",
  "name": "get_access_code",
  "description": "Retrieves access codes for the caller's storage units. Looks up the caller by phone number and returns associated access codes formatted for audio clarity",
  "api_schema": {
    "url": "https://1825-190-68-195-226.ngrok-free.app/voice/phone_ai/execute_function",
    "method": "POST",
    "path_params_schema": [],
    "query_params_schema": [],
    "request_body_schema": {
      "id": "gate_access_code",
      "type": "object",
      "description": "This is an empty schema as no parameters are required.",
      "required": [],
      "properties": {
        "placeholder": {
          "type": "string",
          "description": "Placeholder property as no parameters are required."
        }
      }
    },
    "request_headers": []
  },
  "response_timeout_secs": 20,
  "dynamic_variables": {
    "dynamic_variable_placeholders": {}
  }
}

Here, the properties object includes a placeholder property with a type and description. This satisfies the validation requirement while still indicating that no meaningful parameters are required. You can adjust the placeholder property as needed.

celest gate
#

now it says:

• api_schema.request_body_schema.required: Expected boolean, received array
• api_schema.request_body_schema.properties: Expected array, received object