Skip to main content
Glama

ERC-20 allowance / approval check (8 chains)

erc20_allowance
Read-onlyIdempotent

How much can each spender pull from an owner's tokens? For a token on base, ethereum, bsc, arbitrum, optimism, polygon, gnosis or celo: allowance(owner, spender) for up to 10 spenders, owner balance, symbol, decimals, whether each spender is a contract, EOA or 7702-delegated EOA, and flags for unlimited approvals and approvals to plain EOAs. Use before or after approving, or to audit what to revoke. Price: $0.001 USDC on Base per call, paid with x402 (MCP transport: an unpaid call returns the x402 PaymentRequired object; retry with params._meta["x402/payment"]). Same tool over HTTP: GET /api/erc20-allowance.

Input Schema

NameRequiredDescriptionDefault
chainYes
ownerYes0x owner address
tokenYes0x ERC-20 contract
spenderYes0x spender, or up to 10 comma-separated

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say read-only/idempotent/open-world, while the description adds the facts an agent actually needs to succeed: a price of $0.001 USDC on Base, x402 payment flow, the exact retry mechanism (params._meta["x402/payment"]) after a PaymentRequired response, and a parallel HTTP route. It also discloses what is returned per spender, including unlimited-approval and plain-EOA flags, which is behavioral context the annotations cannot carry.

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 core question and chain scope are front-loaded, then the return fields, then payment mechanics, then the HTTP equivalent. It is dense but each block earns its place; the HTTP GET route and the chain enumeration are slightly redundant against the title and enum, keeping it from a 5.

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?

With no output schema, the description compensates by enumerating the return payload (allowance per spender, balance, symbol, decimals, spender classification, unlimited/EOA flags). Payment and error-retry behavior are spelled out, so nothing essential for a correct call is missing.

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

Parameters3/5

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

Schema coverage is 75% and the schema already documents owner, token, and the comma-separated spender list. The description echoes the 'up to 10 spenders' batch semantics but adds no format or validation detail beyond that, so the schema is doing the heavy lifting. A 3 is the appropriate baseline at this coverage level.

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?

Opens with a precise question ('How much can each spender pull from an owner's tokens?') and then names the exact operation, allowance(owner, spender), the chain set, and the batch size. It is unmistakably distinct from siblings like token_balances or token_risk.

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

Usage Guidelines4/5

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

"Use before or after approving, or to audit what to revoke" gives concrete when-to-use context for a read-only approval check. It stops short of naming alternatives or exclusions, but the lifecycle placement is clear enough to route an agent correctly.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources