ambr_check_transaction
Check one payment against what an agreement allows. Advisory only: Ambr compares what you report with the agreement's terms; it does not authorize, block or see payments, and in_scope is not an approval or a guarantee.
Tests the payment against the agreement's status, validity window, currency, per-transaction limit, monthly limit, approved categories, enumerated actions and approval threshold. If the agreement was amended, the newest approved version is checked. Free: no credits are burned. Ambr does not hold funds or track spend, so the monthly limit is checked only when you pass period_spent. A rule the agreement sets no limit for comes back as not_evaluated, never as a pass. If a rule has a limit but you did not send what it needs (category, action, currency, period_spent), the verdict is "incomplete", not "in_scope". Send everything the agreement limits.
Access: a public contract is open to anyone; otherwise use the creator's API key or pass a share_token.
Args:
contract_id (string, required): Contract ID (amb-YYYY-NNNN), SHA-256 hash, or UUID
amount (number, required): payment amount, zero or more
currency (string, optional): e.g. "USD"
category (string, optional): spending category
action (string, optional): the action the agent is taking
period_spent (number, optional): already spent this month, to check the monthly limit
share_token (string, optional): share token for a private contract
Returns: verdict ("in_scope" | "out_of_scope" | "incomplete" | "needs_approval"), the per-rule checks, plain-language reasons, and the contract that was checked (contract_id, effective_contract_id, sha256_hash, reader_url).
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": {
"contract_id": "<contract_id>",
"amount": "<amount>"
},
"name": "ambr_check_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Action the agent is taking | |
| amount | Yes | Payment amount | |
| category | No | Spending category | |
| currency | No | Payment currency, e.g. USD | |
| contract_id | Yes | Contract ID, SHA-256 hash, or UUID | |
| share_token | No | Share token for a private contract | |
| period_spent | No | Already spent this month |