Skip to main content
Glama

helius_get_token_largest_accounts

Retrieve the largest token accounts for a specific Solana token mint to analyze distribution and identify major holders.

Instructions

Get the largest token accounts for a specific token mint

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenAddressYes
commitmentNo

Implementation Reference

  • The main handler function implementing the tool logic. Validates the token mint address and fetches the largest token accounts using the Helius RPC connection.
    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)}`); } }
  • The input schema definition for the tool, specifying parameters tokenAddress (required) and optional commitment.
    { 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)
    The tool registration mapping the name to its handler function in the handlers dictionary.
    "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