Skip to main content
Glama

Agent Data Hub

ERC-20 token balance of a wallet

chain_erc20_balance
Read-onlyIdempotent

One token balance for one wallet, live from the chain: pass the wallet and the ERC-20 contract (or 'usdc'). Returns human-readable balance, raw amount, symbol, name, decimals and the block read. Chains: Base (default), Ethereum, Arbitrum, Optimism, Polygon, BSC, Avalanche, Gnosis, Base Sepolia. 422 (not charged) if the address is not a token. 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": {
      "address": "<address>",
      "token": "<token>"
    },
    "name": "chain_erc20_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain (default base)
tokenYesERC-20 contract 0x… or 'usdc'
addressYesWallet address 0x…

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already carry readOnly/idempotent/openWorld/destructive, so the bar is lower, and the description still adds real behavioral context: the billing model ($0.001 per call via x402 on Base), a free tier of 10 calls/day, and that a 422 is not charged. Return shape and default chain are also disclosed; what's missing is pagination/rate-limit or failure behavior for a malformed address.

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 front-loads the core purpose and return fields before trailing into chains and pricing; nearly every clause carries information an agent needs. Slightly overpacked, but no filler sentences.

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 compensates by enumerating returned fields, the supported chain set with default, and one failure mode (non-token address → 422, not charged). Complete enough to call correctly, though error handling for invalid wallet addresses is not covered.

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 the schema already documents address, token, and chain including the enum and default. The description adds only the 'usdc' alias convenience and restates the default chain, which is marginal value beyond the structured fields.

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?

States a precise verb+resource: fetch a single ERC-20 token balance for a single wallet, and enumerates the return fields (balance, raw amount, symbol, name, decimals, block). 'Live from the chain' implicitly contrasts with cached siblings like chain_token/chain_balance, but it never names an alternative, so an agent must infer the distinction.

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 only implied: it explains how to call it (wallet + contract or the 'usdc' shortcut) and what chains are supported, but gives no explicit when-to-use/when-not guidance or routing to siblings such as chain_erc20_transfers or chain_live_balance. The 422 note tells the agent when it will fail, not when to prefer another tool.

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