Skip to main content
Glama

get_btc_account_balance

Read-onlyIdempotent

Retrieve the total on-chain Bitcoin balance for a Ledger account by aggregating balances of all cached used addresses. Returns confirmed, mempool, and total sats/BTC with per-address breakdown.

Instructions

READ-ONLY — sum the on-chain balance across every cached USED address (txCount > 0 at last scan) for one Ledger Bitcoin account index. Walks the pairing cache populated by pair_ledger_btc's BIP44 gap-limit scan, fans out to the indexer for live balances, and returns both the rolled-up totals (confirmed + mempool + total sats / BTC) and a per-address breakdown including type, BIP-32 chain (0=receive, 1=change), and addressIndex. Skips empty cached entries (the trailing fresh-receive addresses) to keep fan-out tight. If the cache is stale (recent receive on a previously-empty cached address), call rescan_btc_account to refresh — pure indexer fetch, no Ledger needed. Only re-run pair_ledger_btc when funds may have landed PAST the originally-walked gap window (the rescan flags that case via needsExtend: true).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIndexYesLedger Bitcoin account slot to aggregate. Must have been paired via `pair_ledger_btc` first — the tool fans out across every cached USED address (txCount > 0 at scan time) for this accountIndex, sums their on-chain balances, and surfaces the per-address breakdown so the agent can show which legs hold the funds. Empty cached addresses are skipped to keep the response tight; if you suspect the cache is stale, call `rescan_btc_account` (indexer-only, no Ledger needed).
Behavior5/5

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

The description labels the tool as READ-ONLY, explains the process of walking the pairing cache, fanning out to the indexer, and skipping empty addresses. This adds context beyond the annotations (readOnlyHint, idempotentHint) without contradiction.

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 description is fairly concise for the level of detail, starting with a clear header. While some sentences could be shorter, each adds value. It is well-structured and front-loaded with the core action.

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?

Despite the lack of an output schema, the description fully explains the return format (rolled-up totals and per-address breakdown with type, chain, index). It also covers prerequisites, alternatives, and edge cases, making it complete for this complex tool.

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?

The single parameter `accountIndex` has 100% schema description coverage. The schema description already explains its role and relation to pairing. The tool description reiterates similar context but does not add significant new meaning 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 clearly states it sums the on-chain balance across cached USED addresses for a specific Ledger Bitcoin account index. It distinguishes itself from other balance tools by specifying the use of pairing cache and per-address breakdown, making the purpose unambiguous.

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?

The description provides explicit conditions for when to use this tool, when to call `rescan_btc_account` for stale cache, and when to re-run `pair_ledger_btc` for gap-limit extension. This guides the agent effectively on alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/szhygulin/recon-crypto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server