Pre-payment spend check
spend_check0.002 USDC per call via x402, no key (unpaid call returns PaymentRequired; retry with params.meta["x402/payment"]). Advisory pre-sign check (your wallet's own hard limits still apply; we cannot block a payment): 'would this payment exceed my cap?'. Pass the 402 PAYMENT-REQUIRED (header or body) or amountUsd, plus payer and optional sessionId/host. Returns allow|deny with reasons and remaining budget; reserve:true also logs it as pending. Needs a key mts (X-API-Key header or apiKey argument). No key? call settle_trial_key (free, 50 calls/7 days). Full plan 1 USDC/30d incl. 1,000 calls via x402.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "spend_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Your order / request id (idempotency key). | |
| host | No | Seller hostname, e.g. api.example.com. | |
| payTo | No | Seller receiving address 0x…. | |
| payer | No | Payer / agent wallet address 0x… (40 hex). | |
| apiKey | No | Your MoneyTools Settle key mts_… (alternative to the X-API-Key header). No key: call settle_trial_key. | |
| network | No | CAIP-2 network, default eip155:8453 (Base). | |
| reserve | No | true = log this payment as pending if allowed. | |
| amountUsd | No | USD amount as decimal string, e.g. "0.25". | |
| sessionId | No | Your session / run id. | |
| paymentRequired | No | The 402 PAYMENT-REQUIRED header (base64) or the 402 JSON body. |