approve_token
Approve a spender contract to transfer ERC-20 tokens on your behalf, required before DeFi protocol interactions. Specify an exact amount; unlimited approvals are refused by default.
Instructions
Approve a spender contract to transfer ERC-20 tokens on your behalf. Required before interacting with any DeFi protocol (DEXs, lending, etc.). Specify an exact amount. "max" (an unlimited allowance) is refused by default and always under a spend policy; only the operator can allow it, with AGENTWALLET_ALLOW_UNLIMITED_APPROVAL=1 while no policy is set. Under a spend policy an approval is a spend: it counts against the budgets and the spender is checked as a recipient.
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": {
"wallet_id": "<wallet_id>",
"token": "<token>",
"spender": "<spender>",
"amount": "<amount>",
"chain_id": "<chain_id>"
},
"name": "approve_token"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | ERC-20 token contract address | |
| amount | Yes | Amount to approve in human-readable format (e.g. "1000"); "max" means unlimited and is refused unless the operator allowed it | |
| spender | Yes | Contract address to approve as spender | |
| chain_id | Yes | Chain ID | |
| decimals | No | Token decimals. Resolved from the registry or the token contract when omitted; if given, it must match | |
| wallet_id | Yes | Wallet ID |