Skip to main content
Glama

Hearth: x402 Pay-Safety & Discovery

base_erc20_balance

Read-only

ERC20 token balance on Base. ERC20 balance of any wallet on Base, Ethereum, Arbitrum or Optimism (USDC by default) via balanceOf, with decimals applied. Deterministic, no LLM. Example output: {"chain":"base","wallet":"0x…","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","raw":"1500000","decimals":6,"balance":"1.5"}. Price: $0.0025 USDC on Base via x402 (pass the payment in _meta["x402/payment"]).

Input Schema

NameRequiredDescriptionDefault
chainNoChain: base (default), ethereum, arbitrum, optimism
tokenNoToken contract (default USDC)
walletYesWallet address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the read-only/open-world annotations, the description discloses determinism, no LLM involvement, decimal application, and crucially that the tool is paid via x402 with a specific price and payment meta field. It does not cover error behavior, but the non-obvious payment requirement is well surfaced.

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?

The core operation is front-loaded in the first sentence, followed by useful defaults, output example, and payment details. There is slight repetition between the first two sentences, but information density is good.

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 example output effectively documents the return shape and applied decimals. Payment and chain/token defaults are included; only edge-case or error behavior is left unaddressed.

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 chain, token, and wallet parameters. The description reinforces defaults and supported chains but adds limited parameter-specific detail beyond 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?

The description states a specific verb and resource: fetching ERC20 token balances for a wallet via balanceOf. It names the supported EVM chains and default token, which distinguishes it from sibling tools like solana_balance and wallet_portfolio.

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?

The intended use case is clear: read a single ERC20 token balance across several EVM chains, defaulting to Base and USDC. It does not explicitly compare against alternatives such as wallet_portfolio or token_price, but the context is sufficiently clear for correct selection.

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