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,
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does, without mentioning permissions, rate limits, response format, pagination behavior, or error conditions. This is inadequate for a tool with 4 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single, front-loaded sentence that directly states the tool's purpose. There is no wasted verbiage or unnecessary elaboration, making it efficient for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (4 parameters, no annotations, no output schema, and 0% schema coverage), the description is severely incomplete. It lacks essential details about parameters, behavior, output, and usage context, making it inadequate for effective tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the 4 parameters are documented in the schema. The description only mentions 'mint' and 'owner' but doesn't explain their semantics, formats, or the 'page' and 'limit' parameters. It fails to compensate for the complete lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: retrieving token accounts based on mint or owner criteria. It uses specific verbs ('get') and resources ('token accounts'), but doesn't differentiate from sibling tools like 'helius_get_token_accounts_by_owner' or 'helius_get_token_account_balance', which reduces it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools, prerequisites, or contextual constraints, leaving the agent with no usage direction beyond the basic purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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