Skip to main content
Glama

get_balance_by_address

Fetch keyless, read-only perpetual futures balances for any public address across Pacifica, Hyperliquid, Lighter, and other venues; omit exchange to query every supported DEX.

Instructions

Balances of ANY account by its public address — keyless, read-only (public venue data; nothing is signed, no key is needed). Venues: pacifica (base58 Solana address), hyperliquid (0x address), lighter (0x address), lighter-rh (0x address), risex (0x address); omit exchange to read every one of them (a venue that fails, address format included, is listed in data.errors). data: { balance (equity / available / marginUsed / unrealizedPnl + venue extras; null on Lighter), spot (token balances; null where the venue does not publish them), accounts (Lighter: one row per account of the address; accountIndex narrows), dexes + accountMode (Hyperliquid: HIP-3 dexes with a non-zero account value; a dex that fails is in meta.errors / meta.warnings — unknown, not zero) }. Other venues: CAPABILITY_UNSUPPORTED; a wrong address format: INVALID_PARAMS. Same data as perp [-e <venue>] account balance --address <addr>.

Input Schema

NameRequiredDescriptionDefault
addressYesPublic account address (0x… for hyperliquid / lighter / lighter-rh / risex; base58 Solana for pacifica)
exchangeNoExchange: pacifica, hyperliquid, lighter, lighter-rh, risex (aliases accepted); omit for every one
accountIndexNoLighter only: one account (sub-account) of the address

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.16.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does: read-only, nothing signed, no key required; per-venue failure isolation into data.errors; error codes CAPABILITY_UNSUPPORTED and INVALID_PARAMS; null semantics for Lighter balances and spot; and the warning that Hyperliquid dex failures appear in meta.errors/meta.warnings as unknown rather than zero.

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?

Dense but front-loaded: the keyless/any-address premise comes first, then venues, then the returned shape. It is long, but with no output schema the data-shape sentence earns its place; the parenthetical Lighter/Hyperliquid caveats could be tightened.

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 and no annotations, so the description must supply both the safety profile and the return shape — and it does, including per-venue null behavior, partial-failure reporting, and error taxonomy. An agent can call this correctly and interpret the response without further context.

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 still adds meaning by mapping address formats to venues, explaining that omitting `exchange` fans out to every venue, and clarifying that `accountIndex` narrows an address that otherwise returns one row per Lighter account. Marginal but real added value over the schema text.

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 balances) plus a scoping qualifier that separates it from the sibling get_balance: it works for ANY account by public address and requires no key. The venue list and keyless framing make the tool's identity unmistakable.

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?

Clear usage context: pass any public address, choose a venue or omit `exchange` to sweep all of them, and use `accountIndex` to narrow to one Lighter sub-account. It never explicitly contrasts with the sibling get_balance (own/configured account) or get_positions_by_address, so the routing signal is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.