Set tool mock
Configure mock mode on an HTTP tool. Identify the tool by toolName (its snake_case name) or toolId. Mock mode lets the tool return a canned response, `mockResponse`, after `mockDelayMs`, instead of calling its real URL, so an agent can be tested before its API exists and without firing real side effects. Mocks are scoped to test surfaces: on a phone call carrying a real caller the runtime refuses to serve the canned body and returns an error envelope instead, so never leave a mock on as a substitute for a working endpoint. Pass only the fields you want to change; omit the rest. Builtin tools can't be mocked. To 'edit the mock response', send `mockResponse` with the new JSON string. A mock body may echo the call's own arguments with `{{args.field}}`, write `{"category": "{{args.category}}"}` rather than a fixed value for anything the real API would reflect back, or the mock will contradict what the agent sent and a judge will fail the run for it. TIME THIS EDIT: a mock lives on the agent's DRAFT, so changing one starts a new version and every test green on the old one goes stale (get_test_results marks them). Do it at the start of a draft cycle, not while re-greening a suite you are about to publish. To make a mocked verify_* tool reject a wrong identifier, send `mockMatch`, a JSON string of {arg: expected-value} pairs the call must match (a value can nest an object or array for a tool whose argument is itself structured). To mock a tool that returns DIFFERENT data for different inputs (order A → record A, order B → record B, else → not found), send `mockMocks`, a JSON string of [{match, response, delayMs?}, …]; it supersedes the single mock when set.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/operations/set_tool_mock" \ -H "Content-Type: application/json" \ -d '{ "agent": "string" }'{}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Set tool headers POST
FULL-REPLACE an HTTP tool's headers map (this is NOT a merge: the new map overwrites the existing one entirely, so always send the COMPLETE set of headers you want, not just the ones that changed). Identify the tool by toolName (its snake_case name) or toolId. Pass an object of `{ headerName: value }` (NOT array-of-{key,value}). Empty object clears all headers. Values may contain `{{variable_name}}` placeholders, commonly `Authorization: Bearer {{api_key}}`. **Never send a real credential as a header value**: headers are stored on the tool row in the clear, and a literal credential is refused wherever it is recognisable. Send the placeholder, then put the value in the Vault with `request_secret_variable` in the app (the operator types it into a dialog you never see) or, over the MCP, `set_secret_variable`.
Set tool outputs POST
Keep fields of an in-call HTTP tool's response as variables for after the call. `outputs` maps a snake_case variable name to a dot path in the JSON response, the same grammar as a workflow function's outputs: {"booking_id": "booking.id", "first_slot": "slots[0].start"}. After each successful response the runtime reads each path and keeps the value for the rest of the call; a repeat call keeps the latest value, and a missing path or a non-JSON body keeps nothing and never changes what the agent hears. Hang-up and post-call functions then read the value as {{booking_id}}. A name must not be a system or post-call variable, a caller detail, a post-call field or a pre-call function output. Replaces the whole map; pass {} to keep none. Nothing is kept when the agent stores basic details only.