Skip to main content
Glama

OnchainCheck Wallet Screen

Eth erc20 allowance

eth_erc20_allowance
Read-onlyIdempotent

ERC-20 allowance on Ethereum: how much a spender may transfer from an owner, whether the approval is effectively unlimited, the owner's balance, and the amount the spender could move right now. Costs $0.005 USDC on Base via x402.

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": "eth_erc20_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
ownerYesAddress that granted the approval
tokenYesERC-20 contract on Ethereum
spenderYesAddress allowed to spend

Output Schema

NameRequiredDescriptionDefault
rawNostring, e.g. "11579208923731619542357098500868790785326998466564056403945
chainNostring, e.g. "eth"
ownerNostring, e.g. "0x72aB1B98b60a9251Cc00ab1C3bBe9F48CdFdCA40"
tokenNostring, e.g. "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
symbolNostring, e.g. "USDC"
spenderNostring, e.g. "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE"
allowanceNostring, e.g. "11579208923731619542357098500868790785326998466564056403945
unlimitedNoboolean, e.g. true
ownerBalanceNostring, e.g. "0"
spendableNowNostring, e.g. "0"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, open-world behavior, so the description's main added value is the payment model: '$0.005 USDC on Base via x402' tells the agent a real cost is incurred and which rail settles it — a genuine operational fact not in the annotations. It also pre-announces derived outputs (unlimited flag, spendable amount) that shape interpretation of results.

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?

Two sentences, front-loaded with the core capability and followed by the cost disclosure; nothing is redundant. The first sentence is dense and slightly run-on with its four-item output list, but every clause carries information.

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 only three fully described required parameters, an output schema already in place, and complete annotation coverage, the description needs only to state the chain, the returned signals, and the payment cost — all of which it does. No calling-relevant information 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 description coverage is 100%, so token/owner/spender are fully documented with patterns, giving a baseline of 3. The description restates the allowance relationship ('how much a spender may transfer from an owner') in conceptual terms but adds no syntax, defaults, or edge-case semantics beyond the 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?

Names a specific verb and resource ('ERC-20 allowance on Ethereum') and enumerates exactly what the caller learns: allowance amount, unlimited-approval flag, owner balance, and currently spendable amount. The chain qualifier ('on Ethereum') separates it from the arbitrum/base/optimism/polygon allowance siblings without ambiguity.

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

Usage Guidelines3/5

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

Usage is implied by the described output (checking approval exposure before a transfer), but there is no explicit when-to-use/when-not-to-use guidance and no mention of alternatives such as the wallet_profile or sanctions tools that an agent might pair with it. The pricing note gives context for invocation cost but not selection guidance.

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