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
| Name | Required | Description | Default |
|---|---|---|---|
| commitment | No | ||
| tokenAddress | Yes |
Input Schema (JSON Schema)
{
"properties": {
"commitment": {
"enum": [
"confirmed",
"finalized",
"processed"
],
"type": "string"
},
"tokenAddress": {
"type": "string"
}
},
"required": [
"tokenAddress"
],
"type": "object"
}
Implementation Reference
- src/handlers/helius.ts:115-126 (handler)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)}`); } }
- src/tools.ts:79-90 (schema)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,