Skip to main content
Glama

Ankr Agent RPC

Account balance by chain

getAccountBalance
Read-only

Balance of an account across many blockchains, by 0x address or ENS name, via the Ankr Advanced API indexer. Assets are ranked by USD value descending and only the top 20 are listed by default (a real wallet can hold 1000+ assets, over half of them priced at $0); tune that with maxTokens/minUsd, or call getBalances for structured JSON. Anything the indexer PRICED at zero or below minUsd is summarised as a dust count instead of being listed. An asset with NO indexer price is not dust: it reads "USD value unknown" and ranks after every priced asset, so on a wallet holding more priced assets than maxTokens none appear here and the note says how many exist off-page. Unknown is not zero. An implausibly large raw balance (typical of scam tokens minting max-uint) is flagged and its balance is withheld; never add it to a total. Each line names the chain the asset is held on, which matters because omitting blockchains queries EVERY chain and interleaves the result across them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
minUsdNoOnly list assets worth at least this many USD; the rest are summarised as dust.
addressYes
maxTokensNoMax assets to list, sorted by USD value descending (default 20, max 100).
blockchainsNoThe blockchains to get the balance for. If not provided, the balance will be fetched for all blockchains. Specify only if you want to get the balance for a specific blockchain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/openWorldHint, but the description discloses far more: dust summarisation thresholds, the distinction between unpriced assets and zero-value assets ('Unknown is not zero'), off-page counts, and scam-token max-uint balances being flagged and withheld. This is exactly the non-obvious data-semantics context an agent needs to interpret output correctly.

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 with purpose and overall dense, but it runs several long lines with some emphatic restatement ('Unknown is not zero', 'never add it to a total') that could be tightened. Every sentence is relevant, so the length is defensible rather than wasteful.

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?

There is no output schema, so the description carries the full burden of explaining the return shape, and it does: per-line chain naming, USD-descending ranking, dust counts, 'USD value unknown' for unpriced assets, and how many assets exist off-page. Nothing needed to call or interpret the tool is missing.

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 75% and the schema already documents minUsd, maxTokens and blockchains. The description still adds meaning beyond the schema by explaining how minUsd and maxTokens interact with dust summarisation and ranking, and what happens when `blockchains` is omitted.

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+resource+scope: 'Balance of an account across many blockchains, by 0x address or ENS name, via the Ankr Advanced API indexer.' It also distinguishes itself from the sibling getBalances ('call getBalances for structured JSON'), so an agent can route between them 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?

Explicitly names the alternative (getBalances) and the condition that selects it (want structured JSON). It also gives concrete operating guidance: default top-20 listing, tune with maxTokens/minUsd, and the warning that omitting `blockchains` queries every chain and interleaves results.

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.