Fetch a URL under Rein spend policy
rein_fetchFetch URLs and handle x402 paywalls: check payment against policy before money moves. Approved payments settle; denied requests stop; over-limit spends escalate for human approval.
Instructions
HTTP fetch with x402 payments governed by Rein. If the resource is behind a paywall, the payment is checked against policy BEFORE any money moves: allowed payments are settled and receipted, denied ones never happen, and payments past an envelope are escalated to a human for a signed approval. Use this instead of a plain fetch for any request that might be paid. Returns the response plus what Rein decided.
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": {
"url": "<url>"
},
"name": "rein_fetch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL to fetch. | |
| body | No | Request body, already serialized. | |
| method | No | HTTP method. Default GET. | |
| taskId | No | Attributes this spend to a unit of work, so per-task budgets can cap it. Use one id for every payment of one job. | |
| headers | No | Extra request headers. |