Skip to main content
Glama

helius_get_account_info

Retrieve Solana account details including balance and data for any wallet address using the Helius API.

Instructions

Get account information for a Solana address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publicKeyYes
commitmentNo

Implementation Reference

  • The main handler function that validates the input public key, fetches account information from the Helius RPC connection, and returns a formatted success or error response.
    export const getAccountInfoHandler = async (input: GetAccountInfoInput): Promise<ToolResultSchema> => { const publicKeyResult = validatePublicKey(input.publicKey); if (!(publicKeyResult instanceof PublicKey)) { return publicKeyResult; } try { const accountInfo = await (helius as any as Helius).connection.getAccountInfo(publicKeyResult, input.commitment); return createSuccessResponse(`Account info: ${JSON.stringify(accountInfo, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting account info: ${error instanceof Error ? error.message : String(error)}`); } }
  • The tool definition including name, description, and input schema for validating parameters: publicKey (required) and optional commitment.
    { name: "helius_get_account_info", description: "Get account information for a Solana address", inputSchema: { type: "object", properties: { publicKey: { type: "string" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: ["publicKey"] } },
  • src/tools.ts:560-560 (registration)
    Registration of the tool name to its handler function in the handlers dictionary.
    "helius_get_account_info": getAccountInfoHandler,

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/dcSpark/mcp-server-helius'

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