Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_account_info

Retrieve detailed account information for a specified public key on the Solana blockchain, including data encoding options like base58, base64, or jsonParsed.

Instructions

Returns all account info for the specified public key.

Args: pubkey (str): Pubkey of account to query encoding (str): Encoding for Account data ("base58", "base64", or "jsonParsed")

Returns: str: Account information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
encodingNobase64
pubkeyYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), which registers and implements the get_account_info tool. It fetches account information from the Solana RPC endpoint using AsyncClient based on the provided pubkey and encoding.
    @mcp.tool()
    async def get_account_info(pubkey: str, encoding: str = "base64") -> str:
        """Returns all account info for the specified public key.
    
        Args:
            pubkey (str): Pubkey of account to query
            encoding (str): Encoding for Account data ("base58", "base64", or "jsonParsed")
    
        Returns:
            str: Account information
        """
        async with AsyncClient(rpc_url) as client:
            info = await client.get_account_info(
                Pubkey.from_string(pubkey), encoding=encoding
            )
            return f"Account info: {info}"
Behavior2/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 states the tool returns account information but doesn't describe what that includes (e.g., balance, data, owner), whether it's a read-only operation, error conditions, or performance aspects like rate limits. This leaves significant gaps for a tool with no annotation coverage.

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 front-loaded with the core purpose, followed by clear sections for Args and Returns. Each sentence earns its place by providing essential information without redundancy. The structure is efficient and easy to parse, with zero wasted text.

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 the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is partially complete. It covers the purpose and parameters well but lacks behavioral details (e.g., what 'account info' entails, error handling) and usage guidelines. This is adequate as a minimum viable description but has clear gaps.

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?

The description adds meaningful semantics beyond the input schema, which has 0% description coverage. It explains that 'pubkey' is the 'Pubkey of account to query' and 'encoding' specifies the format for account data with examples ('base58', 'base64', or 'jsonParsed'). This compensates well for the schema's lack of descriptions, though it doesn't detail default values or constraints.

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: 'Returns all account info for the specified public key.' It specifies the verb ('Returns') and resource ('account info'), and distinguishes it from siblings like get_balance (which returns only balance) and get_multiple_accounts (which handles multiple accounts). However, it doesn't explicitly contrast with all similar siblings, keeping it at 4 rather than 5.

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 siblings like get_balance (for just balance) or get_multiple_accounts (for multiple accounts), nor does it specify prerequisites or exclusions. The agent must infer usage from the purpose alone.

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