Skip to main content
Glama

get_token_allowances

Read-onlyIdempotent

Enumerate all spenders with non-zero ERC-20 token allowances for a wallet on a single EVM chain, using live on-chain data to identify unlimited approvals and revoked allowances.

Instructions

Enumerate every spender that currently holds a non-zero allowance over the wallet's balance of a specific ERC-20 token on a single EVM chain. Pulls Approval events from Etherscan's logs API filtered to the wallet as owner, dedups by spender (keeping the latest event per spender for provenance), then re-reads the LIVE allowance(owner, spender) for each via Multicall3 and drops anyone whose live value is 0 (revoked or fully consumed). Returns rows sorted by allowance descending, each carrying spender, optional spenderLabel (Aave V3 Pool / Uniswap V3 SwapRouter02 / Lido stETH / etc. resolved against the canonical CONTRACTS table), currentAllowance (raw bigint string), currentAllowanceFormatted (decimal-adjusted, or the literal string "unlimited"), isUnlimited (≥MAX_UINT256 − 0.01% — covers wallets that cap below MAX), and the lastApprovedBlock / lastApprovedTxHash / lastApprovedAt provenance. Top-level unlimitedCount and notes[] flag exposure ("the spender(s) can move your entire balance, including future top-ups; revoke via approve(spender, 0)"). Use this for security audits ("do I have any unrevoked unlimited approvals?"), pre-tx checks ("do I already have allowance for X?"), and revoke-cleanup workflows. v1 EVM-only (Ethereum / Arbitrum / Polygon / Base / Optimism). TRON deferred (different indexer surface); Solana intentionally out of scope (SPL delegation is per-account, not per-mint-per-owner — different question shape). Read-only; no signing, no broadcast.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesEVM wallet address whose approvals you want to enumerate. The tool scans Approval events emitted by `token` where this wallet is the indexed `owner`, then re-reads the LIVE allowance for each spender.
tokenYesERC-20 contract address. Must be the actual token contract, not a wrapper or aToken. Native coins (ETH / MATIC) have no allowance concept and are intentionally not supported here.
chainNoWhich EVM chain to scan. Defaults to Ethereum. The same wallet may have different approvals on different chains — you'll need one call per chain to enumerate all of them.ethereum
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false. The description adds extensive behavioral details: pulls Approval events, dedups, re-reads live allowance via Multicall3, drops zero allowances, returns sorted rows with provenance. States read-only, no signing, no broadcast. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-structured: starts with purpose, then method, then output details, then usage cases, then limitations. Every sentence adds value, though it could be slightly tighter. Front-loaded with core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, but the description fully explains the output: rows with spender, spenderLabel, currentAllowance, currentAllowanceFormatted, isUnlimited, provenance fields, unlimitedCount, and notes. Also covers chain support and limitations (TRON, Solana). Complete for a read-only enumeration tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all 3 parameters with descriptions. The description adds value by explaining the wallet is the 'owner' in events, token must be actual contract not wrapper, and chain defaults to Ethereum with the note that different chains may have different approvals. This contextualizes the parameters beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool enumerates spenders with non-zero allowances for a specific ERC-20 token on a single EVM chain. It distinguishes itself from siblings like prepare_revoke_approval by focusing on read-only enumeration. The verb 'enumerate' combined with 'allowances' and specific resource 'ERC-20 token on a single EVM chain' provides precise purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly lists use cases: security audits, pre-tx checks, revoke-cleanup workflows. Also explains when not to use: TRON deferred, Solana out of scope, and that native coins have no allowance concept. Provides context on per-chain calls needed. Gives clear guidance without naming alternative tools explicitly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/szhygulin/vaultpilot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server