Skip to main content
Glama

Check an ERC-20 allowance granted to a spender

evm_allowance
Read-only

ERC-20 allowance an owner has granted a spender for one token: raw and human amount, with the token's symbol and decimals. unlimited is true when the allowance is at least 2^255, the usual approve-everything value. Read-only. Related tools on this server, for a different need: evm_balance when you need ERC-20 balance of an address for one token contract; evm_nft when you need ERC-721 facts for one token: owner, collection name. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

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": {
      "owner": "<owner>",
      "token": "<token>",
      "spender": "<spender>"
    },
    "name": "evm_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNobase (default), ethereum, arbitrum, optimism or polygon
ownerYesToken owner, 0x…
tokenYesERC-20 contract, 0x…
spenderYesSpender, 0x…

Output Schema

NameRequiredDescriptionDefault
rawNo
chainNo
ownerNo
tokenNo
amountNo
sourceNo
spenderNo
checkedAtNo
unlimitedNo
disclaimerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation it discloses genuinely new behavior: the unlimited flag threshold is defined numerically (>= 2^255), and the pricing model is stated ($0.002 per successful call via x402 across listed networks, failures not charged). That payment and failure-charging detail is exactly the kind of operational context an agent cannot get from structured fields.

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?

It is front-loaded with the purpose and return shape before the alternatives and pricing, and every sentence carries information. It is somewhat dense with semicolon-chained clauses, but no sentence is filler.

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?

An output schema exists, so return-value explanation is optional, yet the description still summarizes the payload and the unlimited flag semantics. Combined with pricing and sibling routing, an agent has everything needed to decide and call correctly for a simple read tool.

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 100%, so the schema already documents all four parameters, and the description does not add syntax or constraints for owner/token/spender/chain. Its only extra parameter-adjacent value is naming what the token yields (symbol, decimals), which is return-side rather than input-side. Baseline 3 applies when the schema carries the load.

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 opens with a precise verb+resource: the ERC-20 allowance an owner granted a spender for one token, and adds the returned payload (raw and human amount, symbol, decimals). It explicitly routes sibling tools (evm_balance for balances, evm_nft for ERC-721 facts), so an agent can distinguish this from the rest of the catalog without opening a schema.

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?

It gives clear context for alternatives: use evm_balance for ERC-20 balances and evm_nft for ERC-721 owner/collection facts, framing them as 'a different need'. There is no explicit when-not clause or guidance for unusual cases (e.g. using evm_call for arbitrary contract reads), but the routing intent is unambiguous.

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