api tool sends one HTTPS request to your endpoint and gives the model a short result. This page is the exact contract. Errors are on Errors, and the network rules are on Security.
The tool schema
Templating
{{name}} inserts a value. Spaces inside the braces are allowed. A dotted path reads into an object: {{customer.phone}}.
A name resolves, in this order, to:
- A server variable (see below). Server values always win over anything the model sends.
- A key in
static. - One of the model’s arguments.
missing_variable). Kallabot never sends an empty string in its place.
Where templates work
You can’t set these headers:
authorization, connection, content-length, cookie, host, idempotency-key, keep-alive, proxy-authenticate, proxy-authorization, te, trailer, transfer-encoding, upgrade. Use a credential for authentication.
Server variables
Arguments
- Only arguments declared in
parameters.propertiesare used. Others are dropped, unless the schema setsadditionalProperties. - Arguments are checked against
parametersbefore anything is sent. A mismatch returnsinvalid_arguments. - An argument that names a
statickey is refused withoverride_refused. - Local
$refreferences are inlined before the schema goes to the model.anyOfis kept. A tool with a broken or external$refis left out of the call, and running it returnsinvalid_tool_definition.
Without a body or query template
The arguments not used in the URL, withstatic merged in, go as the query string for GET and DELETE, and as a JSON body for other methods.
The request body is always JSON (Content-Type: application/json).
The response
response controls what the model reads.
The raw response may be at most 256 KB. A bigger one fails with
response_too_large. gzip and deflate are accepted and inflated with a bound.
Content types
A2xx response always succeeds.
A non-
2xx response fails with upstream_rejected and its status, whatever its content type, including JSON that doesn’t parse. On 401, the error is needs_auth.
What the model reads
On success:detail is at most 600 characters. Control characters are removed, credential values are masked and token-like strings (bearer tokens, JWTs, API keys, long hex or base64 runs, password= values) become [redacted]. message is your error_message, when set. With "error_passthrough": false, the result has no detail.
Timeouts
timeout_msdefaults to 8000 ms and is capped at 30000 ms. Connecting has at most 3 seconds.- An agent’s
overrides.timeout_msreplaces it for that agent and can raise it up to 30000 ms. - On phone and web calls, every tool is also capped at 10000 ms.
lookuptools have a shorter deadline: 5 seconds on calls, 6 seconds in chats.- A timeout returns
timeout. On aside_effecttool, a timeout or dropped connection after the request was sent returnsindeterminate. A connect timeout sends nothing and returnsnetwork_error. See Idempotency.
Example: book a viewing
A tool that books a property viewing. The agent collects a name and a time; the caller’s number and the agent’s id come from the server.POST /v1/tools
book_viewing with {"listing_id": "DXB-1042", "name": "Sara Khan", "starts_at": "2026-12-02T10:00:00+04:00", "party_size": 2}, your endpoint receives:
party_size stays a number because the template is exactly "{{party_size}}". If the model leaves out party_size, the call fails with missing_variable before anything is sent. Reply with:
201 Created