Check before spending
check_permissionCheck a proposed purchase against a permission slip (mandate) BEFORE spending.
This is a CHECK only: it never moves money. It tells you whether the purchase fits the permission slip your owner set, before you spend. Present your API key (X-API-Key header). Tenant context is derived from the authenticated key, never from call arguments — never pass a tenant id.
Outcomes:
allow: proceed with the purchase, then submit completion evidence over REST with the returned decision_token (single- use, bound to this exact action). There is deliberately no completion tool in MCP.
needs_human_approval: STOP. Do not buy yet and do not retry in a loop. The owner approves or refuses on their own screen; if they approve, a decision token is issued for this spend — claim it over REST with the same key that ran this check, then buy and complete over REST (Step 4 of the setup guide).
deny: do not buy. A denial is final unless the OWNER changes the slip — never ask for limits to be raised as part of the purchase flow.
Arguments are validated strictly — no type coercion — and any field outside the documented set is refused by name. Repeating a check with the same idempotency_key returns the original check instead of creating a duplicate. Never pass a tenant id, under any name: passing tenant_id, tenant, or tenantId refuses the call. Leave them unset.
mandate_id, agent_id and currency may be omitted: when your key is tied to one permission slip (or your workspace has exactly one), the server fills them from that slip — send only the purchase (category, amount_minor, and optionally counterparty and description).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"category": "<category>",
"amount_minor": "<amount_minor>"
},
"name": "check_permission"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tenant | No | ||
| agent_id | No | ||
| category | Yes | ||
| currency | No | ||
| tenantId | No | ||
| tenant_id | No | ||
| mandate_id | No | ||
| description | No | ||
| amount_minor | Yes | ||
| counterparty | No | ||
| idempotency_key | No |