approve_token_spending
Set an ERC20 token spending allowance for a spender address. Specify token, spender, amount, and network to authorize token transfers.
Instructions
Approve a spender to use your ERC20 tokens
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": {
"tokenAddress": "<tokenAddress>",
"spenderAddress": "<spenderAddress>",
"amount": "<amount>",
"privateKey": "<privateKey>"
},
"name": "approve_token_spending"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to approve (use 'unlimited' for max approval) | |
| network | No | Network name (e.g. 'bsc', 'opbnb', 'ethereum', 'base', etc.) or chain ID. Supports others main popular networks. Defaults to BSC mainnet. | bsc |
| privateKey | Yes | Private key in hex format (with or without 0x prefix). SECURITY: This is used only for address derivation and is not stored. The private key will not be logged or displayed in chat history. | |
| tokenAddress | Yes | ERC20 token contract address | |
| spenderAddress | Yes | Address to approve for spending |