Skip to main content
Glama

Agent Data Tools: Chain data

Optimism ERC-20 balance

op_token_balance

Read one wallet's balance of one ERC-20 token on Optimism: raw amount, decimals, symbol and the human-readable amount, live from the token contract. Use to check stablecoin or token holdings before a transfer or trade; for the native coin use op_balance. Both inputs are 0x addresses (40 hex characters); no contract returns 404 and a non-ERC-20 contract 422, both uncharged. Price $0.003/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only; not marked read-only because each call is charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYes0x ERC-20 token contract address
addressYes0x wallet address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing failure semantics (404 for no contract, 422 for non-ERC-20, both uncharged), pricing/free-tier behavior, and a rationale for readOnlyHint=false. The only gap is it doesn't describe pagination or freshness guarantees, but for a point-read that is minor.

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

Conciseness5/5

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

Front-loaded with purpose, then use case, then error/pricing behavior. Though dense, every clause carries information an agent needs (routing, error codes, cost), so nothing is wasted.

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 compensates by naming the returned fields and the error outcomes, and it covers the cost model and safety rationale. An agent has everything needed to call it correctly and interpret the result.

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 schema already documents both parameters; the description adds the 40-hex-character 0x address format constraint, which is a modest but real value-add. Baseline 3 plus a small format detail yields 4.

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 ('Read one wallet's balance of one ERC-20 token on Optimism') and even enumerates the returned fields (raw amount, decimals, symbol, human-readable amount). It explicitly distinguishes itself from the sibling op_balance for the native coin, so an agent can route without opening either 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?

Gives an explicit use case ('check stablecoin or token holdings before a transfer or trade') and names the alternative for the native coin ('use op_balance'), which is the key routing decision between siblings. Nothing about when to prefer this over op_token_info or op_balance is left to inference.

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.