Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

bitcoin_hd_wallet_balances

Fetch Bitcoin HD wallet balances and transaction summaries using an xpub key. Convert balances to various currencies and view detailed balance data for all derived addresses.

Instructions

Fetch balances for each active child address derived from a Bitcoin HD wallet. This tool provides detailed balance data for Bitcoin wallets identified by an xpub key. Required: walletAddress - The xpub key of the HD wallet. Optional: quoteCurrency - The currency for price conversion (USD, EUR, etc). Returns complete balance details including total balance, available balance, and transaction history summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletAddressYesThe xpub key of the Bitcoin HD wallet to get balances for. Must be a valid extended public key.
quoteCurrencyNoCurrency to quote Bitcoin values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency.

Implementation Reference

  • Registration and implementation of the "bitcoin_hd_wallet_balances" tool.
    server.tool(
        "bitcoin_hd_wallet_balances",
        "Fetch balances for each active child address derived from a Bitcoin HD wallet.\n" +
            "This tool provides detailed balance data for Bitcoin wallets identified by an xpub key.\n" +
            "Required: walletAddress - The xpub key of the HD wallet.\n" +
            "Optional: quoteCurrency - The currency for price conversion (USD, EUR, etc).\n" +
            "Returns complete balance details including total balance, available balance, and transaction history summary.",
        {
            walletAddress: z
                .string()
                .describe(
                    "The xpub key of the Bitcoin HD wallet to get balances for. Must be a valid extended public key."
                ),
            quoteCurrency: z
                .enum(Object.values(validQuoteValues) as [string, ...string[]])
                .optional()
                .describe(
                    "Currency to quote Bitcoin values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency."
                ),
        },
        async (params) => {
            try {
                const response =
                    await goldRushClient.BitcoinService.getBitcoinHdWalletBalances(
                        params.walletAddress,
                        {
                            quoteCurrency: params.quoteCurrency as Quote,
                        }
                    );
                return {
                    content: [
                        {
                            type: "text",
                            text: stringifyWithBigInt(response.data),
                        },
                    ],
                };
            } catch (error) {
                return {
                    content: [{ type: "text", text: `Error: ${error}` }],
                    isError: true,
                };
            }
        }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses behavioral traits by specifying it only fetches 'active' child addresses and outlines return values (total balance, available balance, transaction history). However, it lacks safety disclosures (rate limits, auth requirements) or error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four sentences with clear structure. However, the final two sentences merely repeat parameter information already present in the schema (including the enum values for quoteCurrency), which reduces their value in a concise definition.

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

Completeness4/5

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

Given the absence of an output schema, the description adequately compensates by detailing the return structure (total balance, available balance, transaction history). It also explains the HD-wallet-specific derivation behavior, providing sufficient context for a 2-parameter 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?

Schema description coverage is 100%, establishing a baseline of 3. The description labels parameters as 'Required' and 'Optional' but adds no semantic meaning beyond the schema, which already documents the xpub format and default currency behavior.

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 uses specific verbs ('Fetch') and resources ('balances') and clearly scopes the tool to HD wallets derived from xpub keys. It effectively distinguishes from siblings like 'bitcoin_non_hd_wallet_balances' by emphasizing 'child address' and 'xpub key' specificity.

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?

While the description implies usage through HD-specific terminology (xpub, child addresses), it lacks explicit guidance on when to use this versus 'bitcoin_non_hd_wallet_balances' or other balance tools. No prerequisites or exclusions are stated.

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/covalenthq/goldrush-mcp-server'

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