Documentation Index
Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
Use this file to discover all available pages before exploring further.
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:
- Agent status — agent must be
"active" - Scope check — agent must hold the tool’s required scope
- Rate limit — agent must not exceed the tool’s per-minute rate limit
- Approval gate — if the tool requires approval, invocation is deferred to the approval queue
This endpoint performs the access control decision and generates an audit
receipt. 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
RequiresX-API-Key header or Bearer JWT token. Tenant-scoped via X-Tenant-ID.
Path Parameters
The registered tool name (e.g.,
"search.web", "crm-contact-lookup").Request Body
The MAIP agent identifier requesting the tool invocation (e.g.,
maip:t1234567:01HYX3KPZQ7RJGBN0WFMV8SDEH).The active session ID, if the invocation is scoped to a session. Optional but
recommended for full audit trail linkage.
Response
Whether the invocation was authorized.
true if all access control checks
passed.Invocation status. One of:
"allowed", "denied", "pending_approval".Human-readable explanation when the invocation is denied or pending. Not
present when allowed.
Unique receipt identifier for the invocation, linking to the audit trail. Only
present when
status is "allowed".true when the tool requires human approval and the invocation is queued.
Only present when status is "pending_approval".Identifier for the pending approval request. Use this to check approval status
or to approve/reject via the approvals API. 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:

