Owner: set spending limits for an agent
create_spending_policyFor agent OWNERS. Create spending limits (max per payment, max per day, optional allowed chains, tokens and recipients) and get a policy-locked connection URL to give your agent. Every swap and payment through that URL is checked first and refused if it breaks a rule. Also returns a private admin_key for the spending log and an off switch. Swap Ripper never holds funds.
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": {
"max_per_payment_usd": "<max_per_payment_usd>",
"max_per_day_usd": "<max_per_day_usd>"
},
"name": "create_spending_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | Optional name, e.g. 'research agent'. | |
| allowed_chains | No | Optional list of chains money may move on, e.g. ['base','solana']. Empty = any. | |
| allowed_tokens | No | Optional list of tokens the agent may send, e.g. ['USDC']. Empty = any. | |
| expires_in_days | No | 1-365, default 365. | |
| max_per_day_usd | Yes | Total allowed per UTC day, in USD, e.g. 100. | |
| allowed_recipients | No | Optional list of addresses the agent may pay. Empty = any. | |
| max_per_payment_usd | Yes | Largest single payment allowed, in USD, e.g. 20. |