Manage reusable tool templates that define functions, call transfers, and other capabilities for your AI agents.Tool templates are saved as objects in agent configurations, not as references. This means agents continue working even if you delete a template.
Endpoints#
Retrieve all tool templates in your organization.Request#
Response#
{
"toolTemplates": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Customer Lookup",
"description": "Look up customer information by phone number",
"tool_type": "function",
"tool_config": {
"name": "lookup_customer",
"description": "Retrieves customer details from CRM",
"url": "https://api.example.com/customers",
"parameters": {
"type": "object",
"properties": {
"phone": {
"type": "string",
"description": "Customer phone number"
}
},
"required": ["phone"]
}
},
"created_at": "2025-12-29T10:00:00.000Z",
"updated_at": "2025-12-29T10:00:00.000Z"
}
]
}
Create a new tool template. The name and tool_type fields are required.Request Body#
| Field | Type | Required | Description |
|---|
name | string | Yes | Display name for the tool template |
description | string | No | Description of what this tool does |
tool_type | string | Yes | Tool type: function, endCall, or transferCall |
tool_config | object | Yes | Configuration based on tool type (see below) |
Custom functions that execute webhook calls when the AI decides to use them.
Function Tool Config Fields:| Field | Type | Required | Description |
|---|
name | string | Yes | Function name in snake_case |
description | string | Yes | Description to help AI decide when to use this |
url | string | No | Webhook URL (overrides agent's default) |
parameters | object | Yes | JSON Schema defining function parameters |
async | boolean | No | Fire-and-forget mode (default: false) |
asyncResponse | string | No | Message AI says immediately in async mode |
Response (201 Created)#
{
"toolTemplate": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Customer Lookup",
"description": "Look up customer information by phone number",
"tool_type": "function",
"tool_config": { ... },
"created_at": "2025-12-29T10:00:00.000Z",
"updated_at": "2025-12-29T10:00:00.000Z"
}
}
Retrieve a specific tool template by ID.Parameters#
| Name | In | Type | Description |
|---|
id | path | UUID | Tool template UUID |
Request#
Response#
{
"toolTemplate": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Customer Lookup",
...
}
}
Update an existing tool template. Only provided fields will be updated.PATCH /tool-templates/{id}
Parameters#
| Name | In | Type | Description |
|---|
id | path | UUID | Tool template UUID |
Request Body#
All fields are optional. Only include fields you want to update.Example Request#
Response#
{
"toolTemplate": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"description": "Updated description for customer lookup",
...
}
}
DELETE /tool-templates/{id}
Deleting a template does not affect agents that are using it. The tool configuration is stored as an object in the agent, not as a reference.
Parameters#
| Name | In | Type | Description |
|---|
id | path | UUID | Tool template UUID |
Request#
Response#
Tool templates define reusable tool configurations. When you select tools for an agent, they are copied to the agent's llm_config.tools array:{
"llm_config": {
"provider": "openai",
"model": "gpt-4o-mini",
"tools": [
{
"_template_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "lookup_customer",
"description": "Look up customer information",
"parameters": {
"type": "object",
"properties": {
"phone": {
"type": "string",
"description": "Customer phone number"
}
},
"required": ["phone"]
}
},
{
"_template_id": "660e8400-e29b-41d4-a716-446655440001",
"type": "endCall"
}
]
}
}
The _template_id field is used internally to track which template was used. It's ignored by the AI runtime.
Parameter Types#
Function tool parameters support JSON Schema types:| Type | Description | Example |
|---|
string | Text values | "type": "string" |
integer | Whole numbers | "type": "integer" |
number | Decimal numbers | "type": "number" |
boolean | true/false | "type": "boolean" |
array | Lists | "type": "array", "items": { "type": "string" } |
object | Nested objects | "type": "object", "properties": {...} |
Example: Complex Parameters#
{
"parameters": {
"type": "object",
"properties": {
"customer_id": {
"type": "string",
"description": "Customer UUID"
},
"order": {
"type": "object",
"description": "Order details",
"properties": {
"product_id": { "type": "string" },
"quantity": { "type": "integer", "minimum": 1 }
},
"required": ["product_id", "quantity"]
},
"tags": {
"type": "array",
"description": "Order tags",
"items": { "type": "string" }
}
},
"required": ["customer_id", "order"]
}
}
When the AI decides to use a function tool, a webhook request is sent. See the Tool Calls Webhook documentation for request format and response handling.