Skip to main content
Glama

chain_token_balance

Read-onlyIdempotent

Fetch the ERC-20 token balance for a wallet address or ENS name across Ethereum, Base, Arbitrum, Optimism, or Polygon, including token symbol and decimals.

Instructions

[Trading Data API] ERC-20 token balance for an address or ENS name, with token symbol and decimals read from the contract. Ethereum, Base, Arbitrum, Optimism, Polygon.

Example: /v1/chain-token-balance?address=0xB71C06dAC44c91bc997FB84C247DeEF676F4A9f6&token=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base

Use when you need the balance of one ERC-20 token for an address or ENS name. Not for native balance (chain_balance) or everything a wallet holds (wallet_portfolio).

Behavior: read-only. Priced via x402 (USDC on Base) or free with WICKEDAPI_API_KEY; with neither, you get HTTP 402 with the decoded price in payment_required (a price quote, not a failure).

Input Schema

NameRequiredDescriptionDefault
chainNoOptional. ethereum, base, arbitrum, optimism, polygon (default base).
tokenYesRequired. ERC-20 contract address.
addressYesRequired. Holder: a 0x address or an ENS name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds critical context those cannot: pricing is x402 USDC on Base or free with an API key, and an HTTP 402 with payment_required is a price quote rather than a failure. The note that symbol and decimals are read from the contract also signals an extra on-chain call and its latency implications.

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?

Front-loaded purpose sentence, then example, then usage routing, then behavioral notes — a sensible order with no filler. The long example URL takes significant space for what it conveys, keeping this just short of ideal.

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?

For a three-parameter read tool with full schema coverage and no output schema, this covers purpose, alternatives, chains and the paywall failure mode. The only gap is the exact shape of the returned balance/symbol/decimals payload, which is implied but not spelled out.

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; the description goes further with a worked example URL showing a real address, token contract and chain=base, plus restating that an ENS name is acceptable for address. That is modest added value rather than new semantics, since defaults and chain values already live in the schema.

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 (ERC-20 token balance for an address or ENS name) plus supported chains, and explicitly names the two sibling tools it is not (chain_balance for native, wallet_portfolio for holdings). An agent can distinguish it from every sibling without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use when you need the balance of one ERC-20 token for an address or ENS name' gives the positive condition, and 'Not for native balance (chain_balance) or everything a wallet holds (wallet_portfolio)' gives the exclusions and the exact alternatives to route to.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools