Skip to main content
POST
/
v1
/
tools
create tool
curl --request POST \
  --url https://api.anam.ai/v1/tools \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "search_knowledge_base",
  "description": "Search the knowledge base for information about products and services",
  "type": "SERVER_RAG",
  "config": {
    "parameters": {}
  }
}
'
{
  "id": "0084f07b-6106-4cd8-be32-a66a64284b31",
  "name": "search_knowledge_base",
  "description": "Search the knowledge base for product information",
  "type": "CLIENT",
  "config": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "usageCount": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Unique name for the tool. Must match pattern [a-zA-Z0-9_.-]+

Required string length: 1 - 64
Example:

"search_knowledge_base"

description
string
required

Description of what the tool does. Used by the LLM to decide when to call it.

Required string length: 1 - 1024
Example:

"Search the knowledge base for information about products and services"

type
enum<string>
required

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)
Available options:
CLIENT,
SERVER_RAG,
SERVER_WEBHOOK,
SYSTEM
Example:

"SERVER_RAG"

config
ClientToolConfig · object

Type-specific configuration for the tool

Response

Successfully created tool

id
string<uuid>

Unique identifier for the tool

Example:

"0084f07b-6106-4cd8-be32-a66a64284b31"

name
string

Name of the tool

Example:

"search_knowledge_base"

description
string

Description of what the tool does

Example:

"Search the knowledge base for product information"

type
enum<string>

Type of tool

Available options:
CLIENT,
SERVER_RAG,
SERVER_WEBHOOK,
SYSTEM
config
object

Type-specific configuration

createdAt
string<date-time>

When the tool was created

updatedAt
string<date-time> | null

When the tool was last updated

usageCount
integer

Number of personas using this tool