Skip to main content
An 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:
  1. A server variable (see below). Server values always win over anything the model sends.
  2. A key in static.
  3. One of the model’s arguments.
A missing value is an error the model reads (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.properties are used. Others are dropped, unless the schema sets additionalProperties.
  • Arguments are checked against parameters before anything is sent. A mismatch returns invalid_arguments.
  • An argument that names a static key is refused with override_refused.
  • Local $ref references are inlined before the schema goes to the model. anyOf is kept. A tool with a broken or external $ref is left out of the call, and running it returns invalid_tool_definition.

Without a body or query template

The arguments not used in the URL, with static 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

A 2xx 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:
On failure:
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_ms defaults to 8000 ms and is capped at 30000 ms. Connecting has at most 3 seconds.
  • An agent’s overrides.timeout_ms replaces 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.
  • lookup tools have a shorter deadline: 5 seconds on calls, 6 seconds in chats.
  • A timeout returns timeout. On a side_effect tool, a timeout or dropped connection after the request was sent returns indeterminate. A connect timeout sends nothing and returns network_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
When the model calls 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
and the model reads: