Skip to main content
Glama

helius_get_token_accounts

Retrieve token account information on Solana blockchain by specifying either a mint address or owner address to identify associated token holdings.

Instructions

Get token accounts by mint or owner

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mintNo
ownerNo
pageNo
limitNo

Implementation Reference

  • The main handler function implementing the logic for the 'helius_get_token_accounts' tool. It calls the Helius RPC method getTokenAccounts with the provided input parameters.
    export const getTokenAccountsHandler = async (input: { mint?: string, owner?: string, page?: number, limit?: number }): Promise<ToolResultSchema> => { try { const accounts = await (helius as any as Helius).rpc.getTokenAccounts(input); return createSuccessResponse(`Token accounts: ${JSON.stringify(accounts, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting token accounts: ${error instanceof Error ? error.message : String(error)}`); } }
  • Input schema definition for the 'helius_get_token_accounts' tool, defining the expected input parameters.
    { name: 'helius_get_token_accounts', description: 'Get token accounts by mint or owner', inputSchema: { type: 'object', properties: { mint: { type: 'string' }, owner: { type: 'string' }, page: { type: 'number' }, limit: { type: 'number' } } } },
  • TypeScript type definition for the input of 'helius_get_token_accounts' handler.
    export type GetTokenAccountsInput = { mint?: string; owner?: string; page?: number; limit?: number; }
  • src/tools.ts:583-583 (registration)
    Registration of the 'helius_get_token_accounts' tool handler in the handlers dictionary.
    "helius_get_token_accounts": helius.getTokenAccountsHandler,

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