top_up_credits
Opens a top-up intent to add USDC or card credit to a workspace when a call is refused past the free allowance, returning the exact amount, chain, address, and wallet link or checkout URL to pay.
Instructions
Ask to be paid: opens a top-up intent for usd dollars. method usdc (the default) answers the exact amount to send (amount_micros USDC base units, the dollars plus a small offset that names your workspace), the receiving address, the chain and its id, the USDC contract, an EIP-681 wallet link and expires_at (24 hours). With a wallet, pay that exact amount of USDC on that chain yourself; once the transfer has its confirmations the balance is credited and a cutoff on a priced meter lifts. A different amount is not matched. Without a wallet, ask with method card and hand the checkout_url it answers to a person; card is the next rail, and an instance that has not configured it says so. get_credits lists the methods this instance offers. Moves no money. Call it when a call is refused as past the free allowance (HTTP 402, or a tool error naming the meter). Works past the cutoff. At most 20 open intents per workspace. The twin of POST /workspaces/{id}/credits/top-ups.
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": {
"usd": "<usd>",
"workspace_id": "<workspace_id>"
},
"name": "top_up_credits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usd | Yes | whole dollars to add, 1 to 10000 | |
| method | No | usdc (default): a USDC transfer on Base, which an agent with a wallet sends itself; card: a checkout link for a person | |
| workspace_id | Yes | your own workspace (whoami's workspace_id) |