Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_token_largest_accounts

Retrieve the 20 largest accounts for a specified SPL Token on Solana. Input the token mint address to analyze token distribution and identify top holders.

Instructions

Returns the 20 largest accounts of a particular SPL Token type.

Args: mint (str): Pubkey of token mint to query

Returns: str: Largest token accounts in the format "Largest token accounts: {accounts}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mintYes

Implementation Reference

  • src/server.py:327-327 (registration)
    Registration of the tool using @mcp.tool() decorator.
    @mcp.tool()
  • The main handler function that implements the logic for the get_token_largest_accounts tool. It takes a mint pubkey as string input, uses AsyncClient to call get_token_largest_accounts on the Solana RPC, and returns a formatted string with the results.
    async def get_token_largest_accounts(mint: str) -> str:
        """Returns the 20 largest accounts of a particular SPL Token type.
    
        Args:
            mint (str): Pubkey of token mint to query
    
        Returns:
            str: Largest token accounts in the format "Largest token accounts: {accounts}"
        """
        async with AsyncClient(rpc_url) as client:
            accounts = await client.get_token_largest_accounts(Pubkey.from_string(mint))
            return f"Largest token accounts: {accounts}"
  • Input schema: mint (str). Output: str (formatted largest accounts info). Defined via type hints and docstring.
    async def get_token_largest_accounts(mint: str) -> str:
        """Returns the 20 largest accounts of a particular SPL Token type.
    
        Args:
            mint (str): Pubkey of token mint to query
    
        Returns:
            str: Largest token accounts in the format "Largest token accounts: {accounts}"
        """
        async with AsyncClient(rpc_url) as client:
            accounts = await client.get_token_largest_accounts(Pubkey.from_string(mint))
            return f"Largest token accounts: {accounts}"
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool returns exactly 20 accounts and the output format, but lacks details on permissions, rate limits, error conditions, or whether this is a read-only operation. For a query tool with zero annotation coverage, this leaves significant behavioral gaps.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded with the core purpose. The Args/Returns sections are structured but slightly verbose (e.g., repeating 'Largest token accounts' in the return). Every sentence adds value, though minor trimming is possible.

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

Completeness3/5

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

Given no annotations, no output schema, and low schema coverage, the description provides basic purpose and parameter semantics but lacks behavioral context (e.g., safety, limits) and detailed usage guidelines. It's adequate for a simple query tool but incomplete for robust agent decision-making.

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

Parameters4/5

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

Schema description coverage is 0%, but the description compensates by explaining the 'mint' parameter as 'Pubkey of token mint to query'. This adds meaning beyond the schema's generic 'Mint' title. With only one parameter, the description adequately clarifies its purpose.

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

Purpose5/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 with specific verb ('Returns') and resource ('20 largest accounts of a particular SPL Token type'). It distinguishes from siblings like 'get_largest_accounts' (general) and 'get_token_accounts_by_owner' (owner-specific) by focusing on token mint-based ranking.

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?

No explicit guidance on when to use this tool versus alternatives like 'get_token_accounts_by_owner' or 'get_token_supply'. The description implies usage for token mint queries but lacks context on prerequisites, exclusions, or comparison to siblings.

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

Related 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/tywenk/mcp-sol'

If you have feedback or need assistance with the MCP directory API, please join our Discord server