Skip to main content
Glama

get_chain_allowance

Read-only

How much of an ERC-20 token a spender is approved to move from an owner's wallet, via allowance, across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. The approval read every DeFi, swap and trading agent makes before (and after) a transaction to know if an approve is needed. Live public RPC; one paid call.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_chain_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
x_paymentNoSigned x402 payment payload

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds two useful facts beyond that — the exact chain coverage and that it hits a live public RPC at a cost of one paid call. It does not disclose the return shape (raw base-unit amount vs. formatted) or any failure behavior, so a 3 is right.

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 tight sentences with the resource definition first and the operational context second. The opening is phrased as a question rather than a verb, which is slightly indirect, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a paid, open-world read with no output schema, the definition should say how to target a specific owner/spender/token/chain and what the response contains. Neither is addressed, and the mismatch between the described inputs and the single x_payment parameter leaves a real gap for an agent trying to call it.

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

Parameters2/5

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

Schema coverage is nominally 100%, but the only parameter is an x_payment payload, while the description implies owner, spender, token and chain arguments that have no corresponding schema fields. The description never explains how those inputs are conveyed or how the chain is selected, leaving the agent without a usable mapping from intent to arguments.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the exact resource — an ERC-20 allowance between an owner and a spender — and enumerates the six supported chains. That is enough to separate it from balance/nonce-style siblings, though it never explicitly contrasts itself with a named alternative.

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 states the decision context clearly: read before (and after) a transaction to know whether an approve is needed. That is a genuine when-to-use signal. What is missing is any exclusion or explicit alternative (e.g. when to read balance instead), so it falls short of 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.