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
| Name | Required | Description | Default |
|---|---|---|---|
| encoding | No | base64 | |
| pubkey | Yes |
Implementation Reference
- src/server.py:424-440 (handler)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}"