score_spend
Score a planned payment before sending it. Return a 0-100 risk score, approve/ask_human/block verdict, reasons, and recommended action to prevent mistaken transfers, purchases, or subscriptions.
Instructions
Score a planned payment before sending it. Call this before any tool that transfers crypto, buys a gift card, starts a subscription, or pays an API or merchant. Pass amount in USD, category, merchant or endpoint URL, and any budget remaining. Returns score 0-100, verdict approve | ask_human | block, reasons, and recommended_action.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Planned spend in USD, not in token atomic units. | |
| api_key | No | Optional SpendGate key (sg_live_…). Anonymous callers share a smaller daily cap. | |
| purpose | No | Short human description. Used as the category when category is omitted. | |
| agent_id | No | Your agent or key id. Echoed, not scored in v1. | |
| category | No | One of status_check, api_call, saas, infra, gift_card, crypto_transfer, irreversible. Unknown categories are scored as unknown risk. | |
| currency | No | Payment currency. Defaults to USDC. | |
| endpoint | No | Alias of merchant when the payee is an API URL. | |
| merchant | No | Merchant name or https endpoint URL that will receive the spend. | |
| risk_hints | No | Self-reported hints. Raising: new_payee, new_merchant, first_payment, high_velocity, mismatched_purpose, off_platform, shared_wallet. Lowering: trusted_repeat, within_policy, human_preapproved. known_merchant marks the payee known. | |
| daily_budget_remaining | No | USD still available today. Amount above this is blocked. | |
| monthly_budget_remaining | No | USD still available this month. Amount above this is blocked. |