Skip to main content
Glama

ERC20 allowance

evm_erc20_allowance

How much of a token a spender is still allowed to move on an owner's behalf, and whether that approval is unlimited. The check to run before an approve, and the one that finds forgotten infinite approvals. Flat $0.001 per call, paid over x402 (USDC).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNobase | ethereum | polygon | arbitrum | optimism.
ownerYesAddress that owns the tokens.
tokenYesERC20 contract address.
spenderYesAddress allowed to spend them.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the core behavior (returns allowance amount and whether unlimited) and even includes pricing. However, it does not explicitly state that the call is read-only and does not modify state, nor does it describe error behavior (e.g., reverts on invalid addresses) or the exact return format. For a simple query tool this is acceptable but leaves some gaps.

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

Conciseness5/5

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

The description is two concise sentences with zero waste. The first sentence states the core functionality, and the second provides use cases and pricing. It is front-loaded with the most important information (what it does) and efficiently conveys all necessary context.

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

Completeness4/5

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

For a read-only allowance query with four parameters and no output schema, the description covers the essential aspects: what it returns (amount and unlimited status), when to use it (before approve, finding infinite approvals), and cost. It does not specify the exact JSON return structure or units (e.g., wei vs token decimal), but given the simplicity and the presence of schema documentation for parameters, this is a minor gap. Overall, it provides enough context for an agent to call it correctly.

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 description coverage is 100%, so the schema already documents all four parameters (chain, owner, token, spender) with descriptions. The tool description adds no additional parameter-specific details, such as chain-specific behavior or how to format addresses. Baseline 3 is appropriate when the schema does the heavy lifting.

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's function: it returns how much a spender can still move on an owner's behalf and whether that approval is unlimited. It distinguishes itself from siblings like evm_erc20_balance (balance vs allowance) and evm_token_info (token metadata vs allowance) through the specific focus on spending permissions. The phrasing 'check to run before an approve' gives a concrete use case that further clarifies the purpose.

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?

The description provides explicit when-to-use guidance: 'before an approve' and 'finds forgotten infinite approvals'. This tells an agent exactly the situations where this tool is appropriate. It does not mention alternatives or exclusions, but there is no direct sibling for allowance checks among the listed tools, so the guidance is sufficient for routing.

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