Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_solana_transaction

Retrieve Solana transaction details using a signature to inspect blockchain activity, verify transfers, or analyze network interactions.

Instructions

Get Solana transaction details by signature

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signatureYesTransaction signature
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • MCP tool handler logic in handleSolanaTool switch statement: extracts signature and network, delegates to SolanaService.getTransaction, returns JSON-formatted response or error.
    case 'get_solana_transaction': { const signature = args?.signature as string; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await solanaService.getTransaction(signature, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • SolanaService.getTransaction method: retrieves Solana RPC service and calls 'getTransaction' RPC method with jsonParsed encoding and version 0 support.
    async getTransaction( signature: 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, 'getTransaction', [ signature, { encoding: 'jsonParsed', maxSupportedTransactionVersion: 0, }, ] ); }
  • Input schema definition for the tool, specifying required 'signature' parameter and optional 'network'.
    { name: 'get_solana_transaction', description: 'Get Solana transaction details by signature', inputSchema: { type: 'object', properties: { signature: { type: 'string', description: 'Transaction signature', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['signature'], }, },
  • registerSolanaHandlers function that defines and returns the Tool[] array including get_solana_transaction for registration with MCP server.
    export function registerSolanaHandlers( server: Server, solanaService: SolanaService ): Tool[] { const tools: Tool[] = [ { name: 'get_solana_token_balance', description: 'Get SPL token balance(s) for a Solana wallet', inputSchema: { type: 'object', properties: { walletAddress: { type: 'string', description: 'Solana wallet address', }, mintAddress: { type: 'string', description: 'Optional: SPL token mint address (if not provided, returns all token balances)', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['walletAddress'], }, }, { name: 'get_solana_token_metadata', description: 'Get SPL token metadata (decimals, supply, authorities)', inputSchema: { type: 'object', properties: { mintAddress: { type: 'string', description: 'SPL token mint address', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['mintAddress'], }, }, { name: 'get_solana_balance', description: 'Get SOL balance for a Solana address', inputSchema: { type: 'object', properties: { address: { type: 'string', description: 'Solana address', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['address'], }, }, { 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'], }, }, { name: 'get_solana_block', description: 'Get Solana block information with optional transactions', inputSchema: { type: 'object', properties: { slot: { type: 'number', description: 'Block slot number', }, includeTransactions: { type: 'boolean', description: 'Include full transaction details (default: false)', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['slot'], }, }, { name: 'get_solana_transaction', description: 'Get Solana transaction details by signature', inputSchema: { type: 'object', properties: { signature: { type: 'string', description: 'Transaction signature', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['signature'], }, }, { name: 'get_solana_prioritization_fees', description: 'Get recent prioritization fees for Solana transactions', inputSchema: { type: 'object', properties: { addresses: { type: 'array', items: { type: 'string' }, description: 'Optional: Account addresses to get fees for', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, }, }, { name: 'get_solana_block_height', description: 'Get the latest Solana block height', inputSchema: { type: 'object', properties: { network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, }, }, { name: 'get_solana_fee_for_message', description: 'Estimate fee for a serialized Solana message (base64)', inputSchema: { type: 'object', properties: { message: { type: 'string', description: 'Serialized message in base64', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['message'], }, }, { name: 'get_solana_program_accounts', description: 'Get accounts owned by a Solana program with optional filters', inputSchema: { type: 'object', properties: { programId: { type: 'string', description: 'Program ID (public key)', }, filters: { type: 'array', description: 'Optional RPC filters (memcmp, dataSize, etc.)', items: { type: 'object' }, }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['programId'], }, }, { name: 'get_solana_signatures', description: 'Get transaction signatures for a Solana address (transaction history)', inputSchema: { type: 'object', properties: { address: { type: 'string', description: 'Solana address', }, limit: { type: 'number', description: 'Maximum number of signatures to return (default: 10)', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['address'], }, }, ]; return 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/buildwithgrove/mcp-pocket'

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