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
| Name | Required | Description | Default |
|---|---|---|---|
| tokenAddress | Yes | ||
| commitment | No |
Implementation Reference
- src/handlers/helius.ts:115-126 (handler)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)}`); } }
- src/tools.ts:79-89 (schema)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,