Skip to main content
Glama

chain_allowance

Read-only

ERC20 allowance / approval check — How much a spender may move from an owner's ERC20 balance (token=, owner=, spender=), flags unlimited approvals with a risk level - for wallet-drainer and approval audits. Chains: base (default), ethereum, arbitrum, optimism, polygon via chain=. Price: $0.002 USDC (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": {
      "chain": "<chain>",
      "token": "<token>",
      "owner": "<owner>",
      "spender": "<spender>"
    },
    "name": "chain_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesbase
ownerYes0x000000000000000000000000000000000000dEaD
tokenYes0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
spenderYes0x2626664c2603336E57B271c5C0b26F421741e481

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the description's job is to add what they cannot. It does: it discloses that unlimited approvals are flagged with a risk level, lists the supported chains and the default, and states the price and payment rail ($0.002 USDC via x402). It does not describe the response shape beyond the risk flag.

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?

A single dense paragraph that is front-loaded with the purpose, then parameters, then chains, then price. Every clause carries information, though the em-dash-and-comma packing makes it slightly harder to scan than a two-sentence split would be.

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?

With no output schema, the description must hint at return values, and it does so by mentioning the risk-level flag on unlimited approvals. For a four-required-parameter read tool with full annotation coverage, the remaining gap (exact response fields) is minor.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: it names the roles of token/owner/spender in the allowance relationship and expands chain= beyond the schema's single 'base' example to base (default), ethereum, arbitrum, optimism, polygon.

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 specific verb and resource ('ERC20 allowance / approval check') and immediately defines the semantics: how much a spender may move from an owner's ERC20 balance. That distinguishes it clearly from the balance-oriented siblings like chain_erc20_balance and chain_erc1155_balance.

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 an explicit use case ('for wallet-drainer and approval audits'), which tells the agent when this tool is the right pick rather than a plain balance check. It stops short of naming an alternative or stating when not to use it, so it is clear context without full routing 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