Skip to main content
POST
/
api
/
tools
{
  "config": {
    "tool_name": "GetOrderStatus",
    "tool_description": "Retrieves the status of a customer order using their order ID",
    "webhook_url": "https://api.shop.com/orders/status",
    "http_method": "POST",
    "headers": {
      "Authorization": "Bearer token123"
    },
    "parameters": [
      {
        "parameter_name": "order_id",
        "parameter_type": "string",
        "parameter_description": "The unique order identifier",
        "parameter_required": true
      }
    ],
    "timeout_seconds": 30
  }
}
{
  "success": true,
  "message": "Tool created successfully",
  "data": {
    "tool_id": "tool_a1b2c3d4e5f6",
    "tool_name": "GetOrderStatus",
    "tool_description": "Retrieves the status of a customer order using their order ID",
    "webhook_url": "https://api.shop.com/orders/status",
    "http_method": "POST",
    "headers": {
      "Authorization": "Bearer token123"
    },
    "parameters": [
      {
        "parameter_name": "order_id",
        "parameter_type": "string",
        "parameter_description": "The unique order identifier",
        "parameter_required": true
      }
    ],
    "timeout_seconds": 30,
    "client_id": "org_abc123",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
Create a new custom tool that agents can use during calls.

Headers

X-API-Key
string
required
Your API key for authentication.
X-Organization-Id
string
required
The organization ID.
Content-Type
string
required
Must be application/json.

Permissions

  • tools:create (admin, agent_manager)

Request Body

config
object
required
Tool configuration object.

Response

success
boolean
Indicates if the request was successful.
message
string
Human-readable success message.
data
object
The created tool object.
{
  "config": {
    "tool_name": "GetOrderStatus",
    "tool_description": "Retrieves the status of a customer order using their order ID",
    "webhook_url": "https://api.shop.com/orders/status",
    "http_method": "POST",
    "headers": {
      "Authorization": "Bearer token123"
    },
    "parameters": [
      {
        "parameter_name": "order_id",
        "parameter_type": "string",
        "parameter_description": "The unique order identifier",
        "parameter_required": true
      }
    ],
    "timeout_seconds": 30
  }
}
{
  "success": true,
  "message": "Tool created successfully",
  "data": {
    "tool_id": "tool_a1b2c3d4e5f6",
    "tool_name": "GetOrderStatus",
    "tool_description": "Retrieves the status of a customer order using their order ID",
    "webhook_url": "https://api.shop.com/orders/status",
    "http_method": "POST",
    "headers": {
      "Authorization": "Bearer token123"
    },
    "parameters": [
      {
        "parameter_name": "order_id",
        "parameter_type": "string",
        "parameter_description": "The unique order identifier",
        "parameter_required": true
      }
    ],
    "timeout_seconds": 30,
    "client_id": "org_abc123",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}