Skip to main content
Glama

Agent Data Hub

ERC-20 allowance / approval check

chain_allowance
Read-onlyIdempotent

How much of a token a spender (router, contract, x402 facilitator) is approved to move from an owner: allowance (or 'unlimited'), raw amount, whether any approval exists, the owner's balance and the amount spendable right now (min of both). Use before transferFrom/swaps, or to audit risky unlimited approvals. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.

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>",
      "spender": "<spender>",
      "token": "<token>"
    },
    "name": "chain_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain (default base)
ownerYesToken owner 0x…
tokenYesERC-20 contract 0x… or 'usdc'
spenderYesSpender 0x…

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral context beyond that: the return shape (including the min-of-both spendable calculation) and the x402 pricing model with a free tier of 10 calls/day. It does not mention rate limits beyond the free tier or latency, keeping it below a 5.

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 definition is a single dense sentence, but it is front-loaded with the return semantics before the usage guidance and pricing, so the most important information comes first. No sentence is wasted, though the packed clause structure makes it slightly harder to scan than a cleanly split definition.

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?

There is no output schema, so the description carries the burden of explaining return values, and it does so fully with five named fields and the spendable derivation. Combined with usage guidance and cost disclosure, an agent has everything needed to call this correctly on a 4-parameter, read-only lookup.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description earns an extra point by clarifying the semantic role of the spender parameter (router, contract, x402 facilitator) and framing the owner/spender/token triple as an allowance relationship, which helps an agent map real-world intent onto the parameters.

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 names a specific verb+resource ('How much of a token a spender ... is approved to move from an owner') and enumerates the exact return fields: allowance/unlimited, raw amount, approval existence, owner balance, and spendable amount. That level of specificity makes it clearly distinct from siblings like chain_balance or chain_erc20_balance without needing to name them.

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 concrete when-to-use guidance: 'Use before transferFrom/swaps, or to audit risky unlimited approvals.' That covers both a pre-flight check and an audit scenario. It stops short of naming an alternative tool or stating when not to use it, so it does not reach a 5.

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