curl --request POST \
--url https://api.anam.ai/v1/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "open_calendar",
"description": "Open the calendar UI in the client app.",
"type": "CLIENT",
"config": {
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date to jump to, in YYYY-MM-DD format."
}
}
}
}
}
'import requests
url = "https://api.anam.ai/v1/tools"
payload = {
"name": "open_calendar",
"description": "Open the calendar UI in the client app.",
"type": "CLIENT",
"config": { "parameters": {
"type": "object",
"properties": { "date": {
"type": "string",
"description": "Date to jump to, in YYYY-MM-DD format."
} }
} }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'open_calendar',
description: 'Open the calendar UI in the client app.',
type: 'CLIENT',
config: {
parameters: {
type: 'object',
properties: {date: {type: 'string', description: 'Date to jump to, in YYYY-MM-DD format.'}}
}
}
})
};
fetch('https://api.anam.ai/v1/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anam.ai/v1/tools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'open_calendar',
'description' => 'Open the calendar UI in the client app.',
'type' => 'CLIENT',
'config' => [
'parameters' => [
'type' => 'object',
'properties' => [
'date' => [
'type' => 'string',
'description' => 'Date to jump to, in YYYY-MM-DD format.'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anam.ai/v1/tools"
payload := strings.NewReader("{\n \"name\": \"open_calendar\",\n \"description\": \"Open the calendar UI in the client app.\",\n \"type\": \"CLIENT\",\n \"config\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"date\": {\n \"type\": \"string\",\n \"description\": \"Date to jump to, in YYYY-MM-DD format.\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anam.ai/v1/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"open_calendar\",\n \"description\": \"Open the calendar UI in the client app.\",\n \"type\": \"CLIENT\",\n \"config\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"date\": {\n \"type\": \"string\",\n \"description\": \"Date to jump to, in YYYY-MM-DD format.\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"open_calendar\",\n \"description\": \"Open the calendar UI in the client app.\",\n \"type\": \"CLIENT\",\n \"config\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"date\": {\n \"type\": \"string\",\n \"description\": \"Date to jump to, in YYYY-MM-DD format.\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-0000-0000-000000000000",
"name": "open_calendar",
"description": "Open the calendar UI in the client app.",
"type": "CLIENT",
"config": {
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date to jump to, in YYYY-MM-DD format."
}
}
}
},
"createdAt": "2026-04-20T10:00:00.000Z",
"updatedAt": null,
"usageCount": 0
}create tool
Create a new tool for function calling in persona sessions
curl --request POST \
--url https://api.anam.ai/v1/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "open_calendar",
"description": "Open the calendar UI in the client app.",
"type": "CLIENT",
"config": {
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date to jump to, in YYYY-MM-DD format."
}
}
}
}
}
'import requests
url = "https://api.anam.ai/v1/tools"
payload = {
"name": "open_calendar",
"description": "Open the calendar UI in the client app.",
"type": "CLIENT",
"config": { "parameters": {
"type": "object",
"properties": { "date": {
"type": "string",
"description": "Date to jump to, in YYYY-MM-DD format."
} }
} }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'open_calendar',
description: 'Open the calendar UI in the client app.',
type: 'CLIENT',
config: {
parameters: {
type: 'object',
properties: {date: {type: 'string', description: 'Date to jump to, in YYYY-MM-DD format.'}}
}
}
})
};
fetch('https://api.anam.ai/v1/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anam.ai/v1/tools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'open_calendar',
'description' => 'Open the calendar UI in the client app.',
'type' => 'CLIENT',
'config' => [
'parameters' => [
'type' => 'object',
'properties' => [
'date' => [
'type' => 'string',
'description' => 'Date to jump to, in YYYY-MM-DD format.'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anam.ai/v1/tools"
payload := strings.NewReader("{\n \"name\": \"open_calendar\",\n \"description\": \"Open the calendar UI in the client app.\",\n \"type\": \"CLIENT\",\n \"config\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"date\": {\n \"type\": \"string\",\n \"description\": \"Date to jump to, in YYYY-MM-DD format.\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anam.ai/v1/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"open_calendar\",\n \"description\": \"Open the calendar UI in the client app.\",\n \"type\": \"CLIENT\",\n \"config\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"date\": {\n \"type\": \"string\",\n \"description\": \"Date to jump to, in YYYY-MM-DD format.\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"open_calendar\",\n \"description\": \"Open the calendar UI in the client app.\",\n \"type\": \"CLIENT\",\n \"config\": {\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"date\": {\n \"type\": \"string\",\n \"description\": \"Date to jump to, in YYYY-MM-DD format.\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-0000-0000-000000000000",
"name": "open_calendar",
"description": "Open the calendar UI in the client app.",
"type": "CLIENT",
"config": {
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date to jump to, in YYYY-MM-DD format."
}
}
}
},
"createdAt": "2026-04-20T10:00:00.000Z",
"updatedAt": null,
"usageCount": 0
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Tool definition. The config object shape depends on type — see the inline oneOf for the shape expected for each variant.
Unique name for the tool. Must match pattern [a-zA-Z0-9_.-]+
1 - 64"search_knowledge_base"
Description of what the tool does. Used by the LLM to decide when to call it.
1 - 1024"Search the knowledge base for information about products and services"
Type of tool:
- CLIENT: Triggers events on the client SDK
- SERVER_RAG: Searches knowledge base documents
- SERVER_WEBHOOK: Calls an external webhook URL
- SYSTEM: Internal system actions (end_call, interrupt)
CLIENT, SERVER_RAG, SERVER_WEBHOOK, SYSTEM "SERVER_RAG"
When true, interruptions are disabled while this tool is executing. Defaults to false.
false
Type-specific configuration for the tool
- ClientToolConfig
- ServerRagToolConfig
- ServerWebhookToolConfig
- SystemToolConfig
Show child attributes
Show child attributes
Response
Successfully created tool
Unique identifier for the tool
"00000000-0000-0000-0000-000000000000"
Name of the tool
"search_knowledge_base"
Description of what the tool does
"Search the knowledge base for product information"
Type of tool
CLIENT, SERVER_RAG, SERVER_WEBHOOK, SYSTEM Type-specific configuration
When true, interruptions are disabled while this tool is executing
When the tool was created
When the tool was last updated
Number of personas using this tool
Was this page helpful?

