Skip to main content
Glama

ERC-20 allowance on Base (owner, spender)

base_allowance
Read-onlyIdempotent

[PAID $0.002 USDC per call via x402 on Base; errors are free] Reads allowance(owner, spender) for an ERC-20 token on Base mainnet (chain 8453) via public JSON-RPC eth_call (same free RPC pool as /api/base/token). Defaults: token=USDC, owner=vitalik.eth, spender=canonical Permit2 (0x000000000022D473030F116dDEE9F6B43aC78BA3). Returns allowance in token units and raw integer, plus decimals/symbol/name. Invalid address = 400, RPC failure = 502, never charged. Informational only, not investment advice. One or two RPC batch calls; no paid upstream.

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

Input Schema

NameRequiredDescriptionDefault
ownerNoToken holder address (default vitalik.eth 0xd8dA…6045)
tokenNoERC-20 token address on Base (default USDC)
spenderNoApproved spender (default canonical Permit2)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description still adds substantial behavior: x402 pricing ($0.002 USDC per call), that errors are free and never charged, and the 400/502 failure semantics. It also discloses the call shape ('one or two RPC batch calls; no paid upstream'), which goes well beyond the annotation set.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Everything is packed into one dense paragraph where the pricing bracket and the 'not investment advice' disclaimer compete with the actual purpose. It is information-rich but not front-loaded on what the tool does, and some clauses (upstream/RPC pool note) could be trimmed.

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 no output schema, the description carries the return contract itself: allowance in token units and raw integer plus decimals/symbol/name. Combined with error codes and defaults, an agent has everything needed to invoke and interpret results.

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 concrete default values the schema only alludes to, including the full canonical Permit2 address and vitalik.eth as owner. That materially helps an agent call the tool with zero arguments.

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 and resource: 'Reads allowance(owner, spender) for an ERC-20 token on Base mainnet (chain 8453)'. It also states the mechanism (eth_call via public JSON-RPC) and pins the chain, so it is clearly distinct from sibling readers like base_token_info or base_wallet_balances.

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 rather than prescribed: it tells you what it reads and gives defaults, plus a pointer that it uses 'the same free RPC pool as /api/base/token', but it never says when to prefer this over a sibling or what case it does not cover. An agent can infer the read-allowance scenario but gets no explicit 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