Skip to main content
Glama

helius_get_token_largest_accounts

Retrieve the largest token accounts for a specific token mint on the Solana blockchain using the Helius API with MCP Helius. Input the token address and commitment level to analyze token distribution effectively.

Instructions

Get the largest token accounts for a specific token mint

Input Schema

NameRequiredDescriptionDefault
commitmentNo
tokenAddressYes

Input Schema (JSON Schema)

{ "properties": { "commitment": { "enum": [ "confirmed", "finalized", "processed" ], "type": "string" }, "tokenAddress": { "type": "string" } }, "required": [ "tokenAddress" ], "type": "object" }

Implementation Reference

  • The handler function that implements the core logic: validates the token mint address, calls the Helius RPC method getTokenLargestAccounts, and formats the response.
    export const getTokenLargestAccountsHandler = async (input: GetTokenLargestAccountsInput): Promise<ToolResultSchema> => { const tokenAddressResult = validatePublicKey(input.tokenAddress); if (!(tokenAddressResult instanceof PublicKey)) { return tokenAddressResult; } try { const largestAccounts = await (helius as any as Helius).connection.getTokenLargestAccounts(tokenAddressResult, input.commitment); return createSuccessResponse(`Token largest accounts: ${JSON.stringify(largestAccounts.value)}`); } catch (error) { return createErrorResponse(`Error getting token largest accounts: ${error instanceof Error ? error.message : String(error)}`); } }
  • JSON input schema defining the tool parameters: tokenAddress (required string), commitment (optional enum).
    { name: "helius_get_token_largest_accounts", description: "Get the largest token accounts for a specific token mint", inputSchema: { type: "object", properties: { tokenAddress: { type: "string" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: ["tokenAddress"] } },
  • src/tools.ts:554-554 (registration)
    Maps the tool name to the handler function in the central handlers dictionary used for tool dispatch.
    "helius_get_token_largest_accounts": getTokenLargestAccountsHandler,

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