Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

native_token_balance

Retrieve native token balances for EVM addresses across multiple blockchain networks. Specify chain and wallet address to get current balance with market value, historical data, and token metadata.

Instructions

Lightweight endpoint to just get the native token balance for an EVM address. Required: chainName (blockchain network), walletAddress (wallet address). Optional: quoteCurrency for value conversion, blockHeight for historical balance. Returns native token balance with current market value and token metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesThe blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet').
walletAddressYesThe wallet address to get native token balance for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically.
quoteCurrencyNoCurrency to quote native token value in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency.
blockHeightNoSpecific block height to get historical native token balance from.

Implementation Reference

  • The native_token_balance tool handler registration and implementation in BalanceService.ts. It uses the Covalent SDK's BalanceService to fetch the balance.
    server.tool(
        "native_token_balance",
        "Lightweight endpoint to just get the native token balance for an EVM address. " +
            "Required: chainName (blockchain network), walletAddress (wallet address). " +
            "Optional: quoteCurrency for value conversion, blockHeight for historical balance. " +
            "Returns native token balance with current market value and token metadata.",
        {
            chainName: z
                .enum(Object.values(ChainName) as [string, ...string[]])
                .describe(
                    "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')."
                ),
            walletAddress: z
                .string()
                .describe(
                    "The wallet address to get native token balance for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically."
                ),
            quoteCurrency: z
                .enum(Object.values(validQuoteValues) as [string, ...string[]])
                .optional()
                .describe(
                    "Currency to quote native token value in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency."
                ),
            blockHeight: z
                .union([z.string(), z.number()])
                .optional()
                .describe(
                    "Specific block height to get historical native token balance from."
                ),
        },
        async (params) => {
            try {
                const response =
                    await goldRushClient.BalanceService.getNativeTokenBalance(
                        params.chainName as Chain,
                        params.walletAddress,
                        {
                            quoteCurrency: params.quoteCurrency as Quote,
                            blockHeight: params.blockHeight,
                        }
                    );
                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?

No annotations are provided, so the description carries the full disclosure burden. It compensates partially by stating the return value structure ('native token balance with current market value and token metadata'), but lacks information on error handling, caching behavior, or authentication requirements.

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 front-loaded with the core purpose ('Lightweight endpoint...') and efficiently structured. The enumeration of required/optional parameters is slightly redundant given the complete schema, but serves as a useful quick reference without excessive verbosity.

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 appropriately discloses the return structure (balance, market value, metadata). The input schema is comprehensive (100% coverage, enums for chainName and quoteCurrency), so the description does not need to elaborate further on parameter semantics.

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?

With 100% schema description coverage, the baseline is 3. The description adds marginal context by framing quoteCurrency as 'for value conversion' and blockHeight as 'for historical balance', but largely restates information already clear in 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?

Description explicitly states 'get the native token balance for an EVM address' with specific verb, resource, and scope. Mention of 'EVM address' effectively distinguishes it from sibling Bitcoin tools (bitcoin_hd_wallet_balances) and 'native token' distinguishes from ERC20 tools (token_balances).

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?

The term 'Lightweight endpoint' implies a preference for simple, direct queries, but there is no explicit guidance on when to use this versus alternatives like multichain_balances (for cross-chain) or token_balances (for ERC20). No 'when not to use' or explicit comparison to siblings is provided.

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