Skip to main content
Glama

get_account_info

Retrieve detailed account information from the Solana blockchain by providing an account address. This tool enables users to access account data for wallet management and blockchain interactions.

Instructions

Get detailed account information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesAccount address

Implementation Reference

  • The handler function `handleGetAccountInfo` that implements the core logic: ensures Solana connection, parses address to PublicKey, fetches account info via `connection.getAccountInfo`, and returns formatted details or existence status.
    async function handleGetAccountInfo(args: any) { const { address } = args; ensureConnection(); const pubkey = new PublicKey(address); const accountInfo = await connection.getAccountInfo(pubkey); if (!accountInfo) { return { address, exists: false }; } return { address, exists: true, lamports: accountInfo.lamports, owner: accountInfo.owner.toString(), executable: accountInfo.executable, rentEpoch: accountInfo.rentEpoch, dataLength: accountInfo.data.length }; }
  • Input schema definition for the tool, specifying an object with required 'address' property of type string.
    inputSchema: { type: "object", properties: { address: { type: "string", description: "Account address" } }, required: ["address"] }
  • src/index.ts:212-224 (registration)
    Tool registration entry in the `tools` array provided to `listTools` handler, including name, description, and input schema.
    { name: "get_account_info", description: "Get detailed account information", inputSchema: { type: "object", properties: { address: { type: "string", description: "Account address" } }, required: ["address"] }
  • src/index.ts:1309-1311 (registration)
    Handler dispatch/registration in the switch statement of the `CallToolRequestSchema` handler, mapping tool name to `handleGetAccountInfo` execution.
    case "get_account_info": result = await handleGetAccountInfo(args); break;

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/ExpertVagabond/solana-mcp-server'

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