Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_transaction

Retrieve blockchain transaction details by providing a transaction hash and blockchain name. Access data across multiple networks through Grove's Pocket Network server.

Instructions

Get transaction details by transaction hash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
txHashYesTransaction hash
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Tool registration for 'get_transaction' including name, description, and input schema
    { name: 'get_transaction', description: 'Get transaction details by transaction hash', inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name', }, txHash: { type: 'string', description: 'Transaction hash', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain', 'txHash'], },
  • Executes the 'get_transaction' tool by extracting parameters and calling AdvancedBlockchainService.getTransaction
    case 'get_transaction': { const blockchain = args?.blockchain as string; const txHash = args?.txHash as string; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await advancedBlockchain.getTransaction(blockchain, txHash, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Implements the core getTransaction logic by selecting the appropriate RPC method for the blockchain and delegating to the RPC service
    async getTransaction( blockchain: string, txHash: string, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { const service = this.blockchainService.getServiceByBlockchain(blockchain, network); if (!service) { return { success: false, error: `Blockchain service not found: ${blockchain} (${network})`, }; } // Use appropriate method based on blockchain const method = service.category === 'evm' || service.category === 'layer2' ? 'eth_getTransactionByHash' : service.blockchain === 'solana' ? 'getTransaction' : 'eth_getTransactionByHash'; return this.blockchainService.callRPCMethod(service.id, method, [txHash]); }

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