get_solana_account_info
Retrieve Solana account details including balance and transaction history from mainnet or testnet using Grove's blockchain data access.
Instructions
Get Solana account information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Solana address | |
| network | No | Network type (defaults to mainnet) |
Implementation Reference
- src/handlers/solana-handlers.ts:305-320 (handler)Handler case in handleSolanaTool that extracts arguments, calls SolanaService.getAccountInfo, and returns the formatted response for the MCP tool execution.case 'get_solana_account_info': { const address = args?.address as string; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await solanaService.getAccountInfo(address, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
- Input schema and metadata definition for the 'get_solana_account_info' tool used in registration.name: 'get_solana_account_info', description: 'Get Solana account information', inputSchema: { type: 'object', properties: { address: { type: 'string', description: 'Solana address', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['address'], },
- Supporting service method that performs the actual RPC call to get Solana account information.async getAccountInfo( address: string, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { const service = this.blockchainService.getServiceByBlockchain('solana', network); if (!service) { return { success: false, error: `Solana service not found for ${network}`, }; } return this.blockchainService.callRPCMethod( service.id, 'getAccountInfo', [ address, { encoding: 'jsonParsed', }, ] ); }