Skip to main content
Glama

BRAINIAC Base Chain Data

Get ERC-20 balance

chain-data_token_erc20-balance

Retrieve the ERC-20 token balance of a wallet for a specified token contract on Base Mainnet using eth_call. Price $0.01 USDC. POST /api/v1/chain-data/token/erc20-balance. Unpaid calls return 402 and do not run.

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": {
      "walletAddress": "<walletAddress>",
      "tokenAddress": "<tokenAddress>"
    },
    "name": "chain-data_token_erc20-balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
blockNumberNo
tokenAddressYes
walletAddressYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose important behavior: the call is a read via eth_call, is restricted to Base Mainnet, costs $0.01 USDC, and unpaid calls return 402 without executing. That is meaningful payment and scope context. However, it says nothing about how the returned balance is encoded (raw integer base units vs. decimal-adjusted string), what happens on an invalid or non-contract token address, or whether errors are billed — a serious omission for a balance-read tool that has no output schema.

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?

Four short sentences with the purpose front-loaded, followed by pricing, endpoint, and the unpaid-call failure mode. Every sentence carries information; the raw HTTP path is of marginal use to an agent but is not harmful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter, no-output-schema, no-annotation tool, the definition covers network scope, read semantics, cost, and payment failure. It falls short on the blockNumber parameter, the numeric format of the returned balance, and error/billing behavior on invalid input — gaps an agent would hit on first use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and largely does not. It clarifies that walletAddress is the wallet whose balance is read and tokenAddress is the ERC-20 contract, but the optional blockNumber parameter — the one parameter whose semantics are genuinely non-obvious (historical block pinning vs. default latest) — is never mentioned at all, leaving an undocumented 0%-coverage parameter.

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?

The description gives a specific verb and resource — 'Retrieve the ERC-20 token balance of a wallet for a specified token contract' — plus the network (Base Mainnet) and mechanism (eth_call). It implicitly distinguishes itself from the native-balance sibling by scoping to ERC-20 tokens, but never explicitly names an alternative or a boundary case (e.g., that it cannot read native ETH).

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no named alternatives among the many chain-data siblings (native-balance, total-supply, transfers, contract_read). The agent must infer from the tool name alone that a historical or multi-token query should go elsewhere.

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