Call any HTTP API from an Agent. External tools map Agent parameters to URL, headers, and body templates.
lookup_customer)Use {{parameterName}} template variables for dynamic values:
GET requests: Parameters not substituted into the URL are automatically packed into the query string.
Add authentication and content type:
Default content type is application/json if not specified.
For POST and PUT requests, define the body as JSON with {{variable}} template slots. Place each variable unquoted where its value belongs — the tool serializes the value to its correct JSON type for you.
Each value keeps its type, so a number stays a number and a boolean stays a boolean. The table below shows how each parameter type interpolates:
Do not wrap a {{variable}} in quotes. Writing "name": "{{name}}" produces double-quoted, invalid JSON ("name": ""John"") and logs a validation warning. Always leave the slot bare: "name": {{name}}.
String values are escaped before they are inserted, so quotes, backslashes, and control characters in a parameter value cannot break out of their JSON context or inject new fields.
If you don’t define a body template, the tool keeps its earlier behavior: every parameter not already used in the URL path or query string is serialized into a flat JSON object.
Store credentials securely with {{secret:NAME}} references. Secrets resolve at runtime and are never exposed to Agents or returned in responses:
Add secrets in Settings → Secrets, then reference them by name in headers, URL, or body.
Map each parameter to a {{variable}} in the request URL, headers, or body:
string, number, boolean, object, arrayhttps://api.example.com/customers/{{customerId}}, add parameter customerId (string, required).The tool returns the HTTP response body to the Agent. If the API returns a non-2xx status, the tool fails and the Agent receives the status code and response body as an error.
Ensure your API returns structured JSON that Agents can work with. Example response:
The Agent receives this object and can reference fields like response.name or response.tier.
If your API requires Basic Auth, base64-encode username:password and send it in the header:
Use managed secrets for the credentials value.
External tools can fail if: