Tools
Define HTTP tools the model can call, wire authentication from secrets, require confirmation, act as the user, and test them.
+ New HTTP tool creates a draft named new_tool and opens the editor. The list shows the request (GET https://…), auth, flags (confirm, as user, side effect), which agents use it, and status.
Fields
| Field | Notes |
|---|---|
| Name | snake_case; this is the function name the model calls. |
| Status | draft, published, archived. Only published tools are offered to agents; archived ones are removed from prompts. |
| Description for the model | Say when to call it and what it returns. This drives tool choice. |
| Method, URL | GET, POST, PUT, PATCH, DELETE. URL is a template: https://api.acme.com/orders/{{ input.orderId }}/shipment. Only http(s), no private hosts, redirects are not followed. |
| Headers, Query | JSON objects; values may use {{ input.* }} and {{ context.* }}. |
| Body template | For non-GET methods. Rendered as JSON when parseable; content-type: application/json is set. |
| Auth | None · Bearer (secret) · API-key header (secret, header name default X-Api-Key) · Basic (secret holding user:pass). Secrets are referenced by name and decrypted only at call time. |
| Input schema | JSON Schema of the arguments. additionalProperties: false recommended. Validated before every call (required, type, enum). |
| Timeout, Retries, Backoff | Timeout up to 15 s (default 8 s); up to 3 retries on network errors and 5xx. |
| Requires confirmation | The user approves the call in the chat first (tool.confirmation_required). |
| Acts as the end user | Forwards the user’s own JWT in a header (default X-User-Token) so your API applies its normal permissions. |
| Has side effects | Marker for calls that should never run speculatively. |
Test
The Test with sample input button runs the tool from the runtime with the sample JSON (pre-filled from the schema) and shows status, duration, the request with secrets redacted, and the response body. Use it before attaching a tool to an agent.
Templates
{{ input.orderId }} reads the model’s argument; {{ context.locale }} reads the session context. Unknown paths render as empty strings. Dotted paths only; no expressions.
The Acme sample tools
A fresh workspace ships five tools pointed at the demo backend so a real model has something to call:
| Tool | Request | Confirmation |
|---|---|---|
search_products | GET https://api.kletso.ai/demo/acme/products?q={{ input.query }}&maxPrice={{ input.maxPrice }} | no |
search_flights | GET https://api.kletso.ai/demo/acme/flights?from={{ input.from }}&to={{ input.to }}&date={{ input.date }} | no |
track_shipment | GET https://api.kletso.ai/demo/acme/orders/{{ input.orderId }}/shipment | no |
get_sales | GET https://api.kletso.ai/demo/acme/reports/sales?period={{ input.period }} | no |
cancel_order | POST https://api.kletso.ai/demo/acme/orders/{{ input.orderId }}/cancel | yes |
Replace the URLs with your own endpoints when you are ready; the schemas are a good starting point.