Skip to main content
Glama

Ankr Agent RPC

Wallet balances, native and tokens

getBalances
Read-only

An address's balances on ONE chain: native via eth_getBalance plus, by default, ERC-20 balances with USD from the Ankr Advanced API indexer (tier 0). ENS resolves for the token lookup only; a raw-RPC-only chain returns native alone. Tokens rank by USD descending, top 20 by default; tune with maxTokens/minUsd. Anything PRICED at zero or below minUsd goes to dust (count + USD total); full_count is how many assets exist. UNPRICED assets are not dust: usd: null, unpriced: true, ranked after every priced one, counted by unpriced_on_page/unpriced_total, never summed. A raw balance >=2^128 is implausible: true, formatted balance WITHHELD. Sui: none of that applies. Balances come from the node, RAW in base units; decimals/symbol only where the coin publishes metadata (first 10 types). No USD, dust or ENS; native is SUI, maxTokens caps the token rows, minUsd/includeTokens do nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesChain slug as in rpc.ankr.com/<chain> — any chain Ankr serves (see listChains)
minUsdNoOnly list tokens worth at least this many USD; everything below is bucketed into `dust`. Defaults to excluding only exactly-zero-value tokens.
addressYesAddress (0x...) or ENS name
maxTokensNoMax entries in `tokens` (default 20, max 100). EVM ranks them by USD, tail behind the cursor, and counts the native coin as one of them (repeating `native`); Sui does not, so all are other coin types.
includeTokensNoInclude ERC-20 token balances via AAPI (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations cover only readOnly/openWorld, yet the description discloses genuinely non-obvious behavior: dust bucketing (count + USD total), unpriced assets ranked last and never summed, implausible balances (>=2^128) with the formatted balance withheld, ENS resolving for token lookup only, and raw-RPC-only chains returning native alone. These are exactly the edge cases an agent could not guess from the schema or annotations.

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 (address + one chain, what is returned) is front-loaded in the first sentence, followed by ranking/dust rules and then a scoped Sui exception. It is dense and telegraphic, but nearly every clause carries information; the only minor cost is length and compressed notation like 'usd: null, unpriced: true'.

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 must carry the return contract itself, and it does: `tokens`, `dust`, `full_count`, `unpriced_on_page`/`unpriced_total`, `implausible`, and `native`, plus how each varies by chain family. For a 5-parameter tool with no structured output, nothing an agent needs to interpret results 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 100%, so the baseline is 3. The description exceeds that by explaining cross-parameter interaction the per-parameter schema text doesn't: minUsd drives the `dust` bucket, maxTokens caps token rows and on EVM counts the native coin as one of them while Sui does not, and includeTokens is a no-op on Sui.

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 opening clause is precise: an address's balances on ONE chain, native via eth_getBalance plus ERC-20 via the Ankr indexer, and it even carves out the Sui special case. That is a specific resource with a clear scope. What it does not do is differentiate itself from near-siblings such as getAccountBalance or getTokenHolders, so an agent must infer the distinction.

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

Usage Guidelines3/5

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

Defaults and tuning knobs are stated ('top 20 by default; tune with maxTokens/minUsd'), which implies when each parameter matters, and the Sui paragraph effectively says when the EVM semantics do not apply. However, it never names an alternative tool or states when to prefer getBalances over getAccountBalance/getTokenHolders. Usage is inferable but not explicit.

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.