Tools
Create Tool
Create a new API webhook tool or server-side function tool.
POST
Create tool
Every endpoint on this page requires either a Clerk-issued JWT (
Authorization: Bearer <token>) or
an organization API key (x-api-key: pk_…). Anonymous calls return 401 Unauthorized. See
Authentication for the full setup.Code examples
Creating a POST API tool with a request body
curl
Sample response
Authorizations
Body
application/json
Unique tool name. Alphanumeric with underscores, no leading/trailing underscore.
Pattern:
^[a-zA-Z0-9][a-zA-Z0-9_]*[a-zA-Z0-9]$Example:
"GET_ACCOUNT_BALANCE"
Explains to the LLM what this tool does and when to call it.
Example:
"Retrieves the current account balance for the authenticated customer."
API_TOOL = HTTP webhook call. FUNCTION_TOOL = server-side function.
Available options:
API_TOOL, FUNCTION_TOOL JSON Schema for the tool's input parameters. The LLM uses this to construct the call.
Example:
{
"type": "object",
"properties": {
"customerId": {
"type": "string",
"description": "Customer ID"
}
},
"required": ["customerId"]
}Required when type is API_TOOL.
Required when type is FUNCTION_TOOL.
Message sent to the user before the tool executes (e.g. 'Let me look that up...').
Create tool