Spend Guard
v0.2.0Budgets, payee allowlists, price-spike checks and human approval for agents paying x402 paywalls
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pay_and_fetch Fetch, paying the paywall if there is one
Fetch a URL and, if it answers HTTP 402 (an x402 paywall), pay it through the user's Spend Guard. The payment goes out only if it fits the user's budget, goes to an address the service is known to use and is not a price spike; larger payments and unknown services wait for the user to approve them on the dashboard. Returns the HTTP status, what was paid (amount, payee, transaction) and the response body. Redirects are not followed. A refused payment is final: tell the user what was refused and why, and do not try to pay another way.
| Parameter | Type | Description |
|---|---|---|
url * | string | The http(s) URL to fetch. |
body | string | Request body, for POST, PUT and PATCH. |
headers | object | Extra request headers, e.g. {"accept": "application/json"}. Payment, cookie and origin headers are set by the guard or dropped. |
method | string | Default GET. |
spending_status Spending so far
What has been spent today against the user's daily budget, payments waiting for the user's approval, and the latest payments with their outcome (paid, denied, declined or failed) and every reason. Check it before a series of paid calls.
| Parameter | Type | Description |
|---|---|---|
limit | integer | How many recent payments to list. Default 10. |
spending_policy Spending rules
The rules the guard enforces: the networks it can pay on, the daily and per-payment limits, the amount above which the user approves, the price-spike ratio, and the known services with the addresses they may be paid at. Read only: only the user can change them.