Skip to main content
POST
Invoke Tool

Invoke Tool

POST /v1/tools/{toolName}/invoke Requests invocation of a registered tool on behalf of a machine agent. The platform performs a multi-layer access control check before granting access:
  1. Agent status — agent must be "active"
  2. Scope check — agent must hold the tool’s required scope
  3. Rate limit — agent must not exceed the tool’s per-minute rate limit
  4. Approval gate — if the tool requires approval, the response is pending_approval; the current handler does not create an approval request
If all checks pass, the invocation is recorded. Current tool receipts use a system marker rather than a cryptographic signature. They are audit records, not independently verifiable signed proofs.
This endpoint performs the access control decision and records the decision. It does not proxy the actual tool execution. Your application is responsible for calling the tool’s underlying endpoint after receiving an "allowed" response.

Authentication

Requires X-API-Key header or Bearer JWT token. The workspace is derived from the authenticated credential; do not send X-Tenant-ID.

Response

boolean
Whether the invocation was authorized. true if all access control checks passed.
string
Invocation status. One of: "allowed", "denied", "pending_approval".
string
Human-readable explanation when the invocation is denied or pending. Not present when allowed.
string
Unique receipt identifier for the invocation, linking to the audit trail. Only present when status is "allowed".
boolean
true when the tool requires human approval. The invocation is not automatically queued for approval. Only present when status is "pending_approval".

Example: Allowed Invocation


Access Control Flow

Integration Pattern

After receiving an "allowed" response, execute the tool and optionally record the outcome:

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Path Parameters

toolId
string<uuid>
required

Tool identifier

toolName
string
required

Registered tool name.

Body

application/json
agent_id
string
required
session_id
string<uuid>

Active session to invoke under

Response

Tool invocation result

result
object
receipt_id
string<uuid>
execution_ms
integer