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
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Account address |
Implementation Reference
- src/index.ts:212-224 (registration)Tool registration in the tools array, including name, description, and input schema for listing via ListToolsRequestSchema{ name: "get_account_info", description: "Get detailed account information", inputSchema: { type: "object", properties: { address: { type: "string", description: "Account address" } }, required: ["address"] }
- src/index.ts:215-223 (schema)Input schema defining the required 'address' parameter for the toolinputSchema: { type: "object", properties: { address: { type: "string", description: "Account address" } }, required: ["address"]
- src/index.ts:750-773 (handler)The core handler function that executes the tool logic, fetching and returning Solana account informationasync 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 }; }
- src/index.ts:1309-1310 (registration)Dispatcher case in the CallToolRequestSchema handler that routes calls to the specific handler functioncase "get_account_info": result = await handleGetAccountInfo(args);