HTTP tools
A single HTTP endpoint exposed to the model as a tool. URL placeholders define the LLM-facing parameter schema. GET, POST, PUT, PATCH, and DELETE are all supported. Works identically in embedded and hosted mode.
URL placeholder syntax
The URL template encodes the tool's parameter schema:
| Syntax | Meaning |
|---|---|
{X} | Required path or query parameter |
{X?} | Optional query parameter |
{?units} | Required query (alt form) |
{?units&format} | Multiple required query params |
Each placeholder becomes a parameter the model sees. The placeholder name is the parameter name; the type defaults to string. Use params: to pin a value — the parameter disappears from the model's tool schema and is filled by the template engine instead.
Headers are templated too — they can reference env vars ({{env.NAME}} in embedded mode) or secrets ({{secrets.NAME}} in hosted mode). See Templates and conditions.
POST / PUT / PATCH with a request body
body_type:
json(default) — serializesbodyas JSON, setsContent-Type: application/json.form— URL-encoded form body.query— appendsbodyproperties to the URL's query string (useful when the only "body" you want is on a GET-like request that has many params).
Body fields can be templates ({{userName}}) or pinned literals. Templated fields the LLM provides go in the body; literals don't appear in the model's parameter schema.
Dynamic auth — OAuth2 client credentials
For APIs that require fetching a short-lived access token before each call, declare an auth: block. The runner fetches the token, caches it (refreshes on 401), and applies it — no code required.
Dynamic auth — generic token exchange
For login endpoints that don't match the OAuth2 spec — different field names, plain-text token responses, custom header names — use the parametric token_exchange form:
What you get for free
When you declare auth:, the runner provides:
- Per-tenant token caching keyed by ownerId — tokens are not shared across users.
- Single-flight dedup of concurrent token requests — only one fetch when many tools need the same token.
- Automatic refresh-on-401 with one retry, no infinite loops.
- Redaction of known token / secret substrings from response bodies and error messages — tokens never leak into traces.
Static auth
For APIs with long-lived keys, skip auth: and template the credential directly into headers:
Failures
HTTP tool failures are captured in the tool.execute span. The model sees the error body (truncated, redacted) and can decide whether to retry or give up. Non-2xx responses are treated as errors by default.