Skip to main content
Creates a new mid-call tool. After creation, attach the tool to one or more assistants using the tool_ids parameter.

Endpoint

POST /user/tools

Request

name
string
required
Tool name. Must contain only lowercase letters and underscores, and start with a letter (e.g., get_weather, book_appointment).
description
string
required
Description of when and how the AI should use this tool. Maximum 255 characters. This description is passed to the AI model.
endpoint
string
required
Valid URL of the API endpoint to call.
method
string
required
HTTP method: GET, POST, PUT, PATCH, or DELETE.
timeout
integer
default:"10"
Request timeout in seconds. Range: 1–30.
headers
array
HTTP headers to send with the request.
schema
array
Parameters the AI extracts from the conversation and sends to the endpoint.

Response

message
string
Confirmation message.
data
object
The created tool.

Example

curl -X POST "https://portal.intellixent.ai/api/user/tools" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "check_order_status",
    "description": "Use this tool to check the status of a customer order when they ask about it.",
    "endpoint": "https://api.yourstore.com/orders/status",
    "method": "GET",
    "timeout": 10,
    "headers": [
      {"name": "Authorization", "value": "Bearer sk_..."}
    ],
    "schema": [
      {
        "name": "order_id",
        "type": "string",
        "description": "The customer order ID to check"
      }
    ]
  }'
201 Created
{
  "message": "Tool created successfully",
  "data": {
    "id": 1,
    "name": "check_order_status",
    "description": "Use this tool to check the status of a customer order when they ask about it.",
    "endpoint": "https://api.yourstore.com/orders/status",
    "method": "GET",
    "timeout": 10,
    "headers": [
      { "name": "Authorization", "value": "Bearer sk_..." }
    ],
    "schema": [
      {
        "name": "order_id",
        "type": "string",
        "description": "The customer order ID to check"
      }
    ],
    "created_at": "2025-10-10T12:00:00.000000Z",
    "updated_at": "2025-10-10T12:00:00.000000Z"
  }
}
422 Invalid name format
{
  "message": "The name field must contain only lowercase letters and underscores, and start with a letter.",
  "errors": {
    "name": ["Tool name must contain only lowercase letters and underscores, and start with a letter."]
  }
}
After creating a tool, attach it to an assistant using the tool_ids parameter in Create assistant or Update assistant.