v4

latestOpenAPI 3.1.02026-08-086635375.7 KB
Tools

create tool

Create a new tool for function calling in persona sessions

post/v1/tools

Request body

namestring required

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

descriptionstring required

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

type'CLIENT' | 'SERVER_RAG' | 'SERVER_WEBHOOK' | 'SYSTEM' 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)
disableInterruptionsboolean

When true, interruptions are disabled while this tool is executing. Defaults to false.

Example request

{
  "name": "search_knowledge_base",
  "description": "Search the knowledge base for information about products and services",
  "type": "SERVER_RAG",
  "config": {
    "documentFolderIds": [
      "67d27a9f-0ce1-4432-848b-8ab2b97f024b"
    ]
  }
}

Response

Successfully created tool

idstring uuid

Unique identifier for the tool

namestring

Name of the tool

descriptionstring

Description of what the tool does

type'CLIENT' | 'SERVER_RAG' | 'SERVER_WEBHOOK' | 'SYSTEM'

Type of tool

configobject

Type-specific configuration

disableInterruptionsboolean

When true, interruptions are disabled while this tool is executing

createdAtstring date-time

When the tool was created

updatedAtstring date-time nullable

When the tool was last updated

usageCountinteger

Number of personas using this tool

Example response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "search_knowledge_base",
  "description": "Search the knowledge base for product information"
}