Skip to main content
Glama

Check Balance

check_balance
Read-onlyIdempotent

Check the SOL balance of any Solana wallet address. Get balance in SOL, ready-to-stake status, and next steps for staking.

Instructions

Check the SOL balance of any Solana wallet address. Returns balance in SOL, ready-to-stake status, and next steps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletAddressYesSolana wallet address (base58 public key)

Implementation Reference

  • server.ts:151-152 (registration)
    Registration of the 'check_balance' MCP tool using the McpServer SDK, including its title, description, input schema (zod-validated walletAddress string), and the async handler function.
    mcp.registerTool('check_balance', { title: 'Check Balance', description: 'Check the SOL balance of any Solana wallet address. Returns balance in SOL, ready-to-stake status, and next steps.', inputSchema: { walletAddress: z.string().max(50).describe('Solana wallet address (base58 public key)') }, annotations: READ_ONLY },
      async ({ walletAddress }) => { const { ok, data } = await api('GET', `/api/v1/wallet/balance/${walletAddress}`); if (!ok) return error(`Failed to check balance`, { retry: 'check_balance', generateWallet: 'generate_wallet' }); return result(data, { relatedTools: { stake: 'stake', stakeAccounts: 'check_stake_accounts' } }); });
  • Handler function for check_balance. Takes walletAddress, makes a GET call to /api/v1/wallet/balance/{walletAddress}, returns balance data or an error with related tool suggestions.
    async ({ walletAddress }) => { const { ok, data } = await api('GET', `/api/v1/wallet/balance/${walletAddress}`); if (!ok) return error(`Failed to check balance`, { retry: 'check_balance', generateWallet: 'generate_wallet' }); return result(data, { relatedTools: { stake: 'stake', stakeAccounts: 'check_stake_accounts' } }); });
  • Input schema for check_balance: a single required walletAddress parameter (string, max 50 chars) validated with Zod.
    mcp.registerTool('check_balance', { title: 'Check Balance', description: 'Check the SOL balance of any Solana wallet address. Returns balance in SOL, ready-to-stake status, and next steps.', inputSchema: { walletAddress: z.string().max(50).describe('Solana wallet address (base58 public key)') }, annotations: READ_ONLY },
  • Helper function 'api' used by the handler to make HTTP requests to the Blueprint API backend.
    async function api(
      method: 'GET' | 'POST' | 'DELETE',
      path: string,
      body?: Record<string, unknown>
    ): Promise<{ ok: boolean; status: number; data: unknown }> {
      const url = `${API_BASE}${path}`;
      const headers: Record<string, string> = { 'Content-Type': 'application/json' };
      const res = await fetch(url, {
        method,
        headers,
        signal: AbortSignal.timeout(30_000),
        ...(body ? { body: JSON.stringify(body) } : {}),
      });
      const data = await res.json().catch(() => ({ error: 'non_json_response', status: res.status }));
      return { ok: res.ok, status: res.status, data };
    }
Behavior4/5

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

Annotation s already indicate read-only, non-destructive, and idempotent behavior. The description adds that the tool returns balance in SOL, ready-to-stake status, and next steps, providing behavioral context beyond annotations.

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

Conciseness5/5

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

The description is a single, front-loaded sentence that conveys key information without any unnecessary content.

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 simple input and rich annotations, the description covers the core purpose and return fields. It lacks details on the structure of 'ready-to-stake status' and 'next steps', but remains fairly complete for a balance-check 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 coverage is 100% with the parameter 'walletAddress' already well-described. The description does not add new parameter semantics beyond what the schema provides.

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 the tool checks SOL balance of any Solana wallet address, specifying the resource and action. It distinguishes from siblings like check_address_type by focusing on balance.

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 description implies usage for checking balance but does not provide explicit guidance on when to use this tool vs alternatives (e.g., check_stake_accounts). No when-not-to or alternative mentions.

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/blueprint-infrastructure/solentic-mcp'

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