Skip to main content
Glama

Crypto, web, finance and app data tools

ERC-20 Allowance

erc20_allowance

How much a spender (router, Permit2, protocol) is approved to move from an owner's ERC-20 balance, with an unlimited-approval flag. Use to check approvals before a swap or to audit risky approvals.

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

Input Schema

NameRequiredDescriptionDefault
chainNoethereum
ownerYes
tokenYes
spenderYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

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 must carry the behavioral load. It discloses that an unlimited-approval flag is returned (useful above the output schema) and implies a read-only chain query, but says nothing about chain coverage, reverts for non-contract tokens, or what happens with a zero address.

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?

Two sentences, front-loaded with the semantics of the returned value and followed by the use cases. No filler.

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?

Output schema exists, so return format needn't be re-explained, and the description covers purpose and usage well. The main gap is parameter typing/chain scope, which matters for a 4-param multi-chain tool with 0% schema coverage.

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 0%, so the description must compensate. It does explain the owner/spender roles semantically, which is genuinely helpful, but leaves token, chain, and format (address vs. symbol) completely unaddressed across four params.

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?

States a precise read: the amount a spender is approved to move from an owner's ERC-20 balance, plus an unlimited-approval flag. This cleanly distinguishes it from the sibling erc20_balance (holding balance vs. approval amount) and from erc20_transfers.

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?

Gives two concrete use cases: checking approvals before a swap (with named spender archetypes: router, Permit2, protocol) and auditing risky approvals. Useful routing context, though it doesn't name an alternative tool or state when not to use it.

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