Skip to main content
Glama

get_balance

Retrieve current wallet balance across multiple blockchain networks, with optional currency conversion for financial tracking and management.

Instructions

Get the current balance of the wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoQuery balance for specific network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Use "all" for all networks. Required for EVM wallets; auto-resolved for Solana.
display_currencyNoDisplay currency for balance conversion (e.g. KRW, EUR). Defaults to server setting.
wallet_idNoTarget wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.

Implementation Reference

  • The handler function for the get_balance MCP tool, which calls the API to retrieve wallet balances.
      async (args) => {
        const params = new URLSearchParams();
        if (args.network) params.set('network', args.network);
        if (args.display_currency) params.set('display_currency', args.display_currency);
        if (args.wallet_id) params.set('walletId', args.wallet_id);
        const qs = params.toString();
        const result = await apiClient.get('/v1/wallet/balance' + (qs ? '?' + qs : ''));
        return toToolResult(result);
      },
    );
  • Registration function for the get_balance MCP tool.
    export function registerGetBalance(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void {
      server.tool(
        'get_balance',
        withWalletPrefix('Get the current balance of the wallet.', walletContext?.walletName),
        {
          network: z.string().optional().describe('Query balance for specific network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Use "all" for all networks. Required for EVM wallets; auto-resolved for Solana.'),
          display_currency: z.string().optional().describe('Display currency for balance conversion (e.g. KRW, EUR). Defaults to server setting.'),
          wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'),
        },
        async (args) => {
          const params = new URLSearchParams();
          if (args.network) params.set('network', args.network);
          if (args.display_currency) params.set('display_currency', args.display_currency);
          if (args.wallet_id) params.set('walletId', args.wallet_id);
          const qs = params.toString();
          const result = await apiClient.get('/v1/wallet/balance' + (qs ? '?' + qs : ''));
          return toToolResult(result);
        },
      );
    }
Behavior2/5

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

No annotations provided, so description carries full disclosure burden. Fails to indicate if this performs live RPC queries vs. cached reads, potential latency, or whether the returned balance includes pending transactions. No mention of authentication requirements despite financial sensitivity.

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?

Extremely brief at 7 words/1 sentence with no redundancy. However, the minimalism comes at the cost of necessary context, preventing a 5. Structure is clear and front-loaded.

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

Completeness2/5

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

Inadequate for a wallet tool with 45+ siblings including direct alternatives. Fails to explain the conceptual model (wallet vs. assets vs. perp-market balances) or output format despite no output schema being present. Missing critical context for an agent to select correctly among similar tools.

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%, providing detailed explanations for 'network', 'wallet_id', and 'display_currency'. The description adds no parameter-specific semantics (e.g., auto-resolution behavior for wallet_id), warranting the baseline score for well-documented schemas.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

States basic verb and resource ('Get... balance of the wallet') but remains vague on scope. Does not clarify whether this returns native currency only vs. all assets/tokens, nor distinguish from siblings like 'get_assets', 'get_tokens', or 'waiaas_pm_get_balance'.

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

Usage Guidelines2/5

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

Provides no guidance on when to use this versus 'get_assets' or 'waiaas_pm_get_balance'. No mention of prerequisites (wallet connection) or when specific parameters like 'wallet_id' are required.

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/minhoyoo-iotrust/WAIaaS'

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