Set tool requires
Set the tools that must have fired earlier in the same call before this tool is available. Identify the tool by toolName (its snake_case name) or toolId. This is V1's **only** ordering primitive, don't write 'first call verify_caller, then book_meeting' in the system prompt; set `book_meeting.requires = ["verify_caller"]` here instead. The runtime gates invocation deterministically and returns a `precondition_unmet` envelope when the LLM tries a tool too early; the LLM self-corrects on the next turn. Each entry is either a bare tool name (unconditional prerequisite) or a conditional `{tool, when: {arg, equals}}` object that only applies when THIS tool is dispatched with that argument value, e.g. `end_call.requires = [{tool: "take_a_message", when: {arg: "reason", equals: "abuse"}}]` means: if `end_call` is about to hang up on an abusive caller, a message must have been captured first, but ending the call for any other reason needs no such prerequisite. Conditions read only the CALLING tool's own arguments, never another tool's output. The Python runtime compares `equals` case/whitespace-insensitively, so `"Abuse"` and `"abuse "` both match. **Don't write requires that reference a tool that doesn't exist**, the validator will reject the agent at publish time. Pass `[]` to clear preconditions.
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_requires" \ -H "Content-Type: application/json" \ -d '{ "requires": [ "string" ], "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 repeat-safe POST
Mark whether a tool re-executes on an identical repeat (`repeatSafe: true`) or is deduplicated (`false`, the default). The runtime keeps a short-lived cache of each completed tool call: a second call with the SAME name + arguments within ~30s normally replays the cached result instead of re-running, a guard that stops a failover turn-rerun from DUPLICATING an external write (a second email / CRM row / booking). Set `repeatSafe: true` ONLY when re-execution has no such side effect AND identical repeats are intended, an idempotent lookup a caller fires repeatedly, or a live-screen reflex action (saying 'up' twice must move the paddle up twice). Leave it `false` for anything that writes. Builtins like `move_paddle` force it on in code; this is the operator override for HTTP tools. Identify the tool by toolName (its snake_case name) or toolId.
Set tool response template POST
Set a declarative response template on an HTTP tool, a map from HTTP status → a compact result the model can't misread, so a verbose or ambiguous upstream body (a booking POST that returns a fat 201 JSON blob) can't be read as a failure. Identify the tool by toolName (its snake_case name) or toolId. `responseTemplate` is a JSON string keyed by status pattern ("201", "2xx", "default"); a string value is the success result (with {{jmespath}} fields resolved against the body, e.g. {{data.starts_at}}), an object value is returned verbatim as an {error,message} envelope. The reserved "match" key holds ordered {when,then} branches that test the BODY with a bare JMESPath condition and run before any status key, that is how an endpoint reporting failure inside a 200 (a lookup that resolved nothing) returns a real error envelope instead of a false success. No matching key = today's raw body. Pass null to clear it. This is symmetric with the request-side {{variable}} templating on the URL/headers.