Tool discovery

Execute a tool with an optional approved quote

Uses the same approval, spending limits, idempotency and billing result as MCP execute. max_credits caps the charge (409 charge_ceiling_exceeded, nothing charged). When a spending policy returns an approval_token and idempotency_key, send both with the identical slug, customer and args. HTTP 200 means the execution envelope was delivered; inspect result.isError and its billing metadata before treating the call as successful. Sandbox credentials are not supported.

post/credits/tools/execute

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/tools/execute
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Headers

X-Locus-End-Userstring

For a trusted workspace credential, select the same customer used for the approval. A customer-bound credential cannot select another account.

Request body

slugstring required
argsobject
approval_tokenstring
idempotency_keystring required
loop_idstring
attributionobject

Response

MCP-compatible tool result, including success or failure and charge metadata

successunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.