get_allowance
Check how many ERC-20 tokens a spender is approved to transfer, returned in raw and human-readable format. Use it to verify whether an approval is needed before a DeFi transaction.
Instructions
Check how many ERC-20 tokens a spender is approved to transfer. Returns the allowance in both raw and human-readable format. Use this to check if an approval is needed before a DeFi transaction.
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>",
"chain_id": "<chain_id>"
},
"name": "get_allowance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | ERC-20 token contract address | |
| spender | Yes | Spender contract address to check | |
| 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 (used to determine the owner address) |