Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

get_transaction_receipt

Retrieve transaction receipts on Arbitrum networks using transaction hashes to verify execution status and details.

Instructions

Get transaction receipt by hash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rpcUrlNoThe RPC URL of the chain (optional if default is set)
txHashYesTransaction hash

Implementation Reference

  • Handler logic for the get_transaction_receipt MCP tool. Resolves RPC URL from args or chainName, creates EthereumAccountClient instance, fetches transaction receipt using the client's method, and returns JSON stringified response.
    case "get_transaction_receipt": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const ethereumAccountClient = new EthereumAccountClient(rpcUrl); const receipt = await ethereumAccountClient.getTransactionReceipt( args.txHash as string ); return { content: [ { type: "text", text: JSON.stringify(receipt, null, 2), }, ], }; }
  • Input schema definition for the get_transaction_receipt tool returned by list tools handler. Defines required txHash and optional rpcUrl parameters.
    name: "get_transaction_receipt", description: "Get transaction receipt by hash", inputSchema: { type: "object" as const, properties: { rpcUrl: { type: "string", description: "The RPC URL of the chain (optional if default is set)", }, txHash: { type: "string", description: "Transaction hash", }, }, required: ["txHash"], }, },
  • Core implementation of transaction receipt fetching via eth_getTransactionReceipt RPC call, with response parsing to Receipt type. Called by the MCP tool handler.
    async getTransactionReceipt(txHash: string): Promise<Receipt> { const receipt = await this.makeRpcCall('eth_getTransactionReceipt', [txHash]); if (!receipt) { throw new Error(`Transaction receipt for ${txHash} not found`); } return { transactionHash: receipt.transactionHash, transactionIndex: parseInt(receipt.transactionIndex, 16), blockHash: receipt.blockHash, blockNumber: parseInt(receipt.blockNumber, 16), from: receipt.from, to: receipt.to, cumulativeGasUsed: parseInt(receipt.cumulativeGasUsed, 16), gasUsed: parseInt(receipt.gasUsed, 16), contractAddress: receipt.contractAddress, logs: receipt.logs, status: receipt.status }; }
  • TypeScript interface defining the structure of the transaction receipt object returned by the helper method.
    export interface Receipt { transactionHash: string; transactionIndex: number; blockHash: string; blockNumber: number; from: string; to: string | null; cumulativeGasUsed: number; gasUsed: number; contractAddress: string | null; logs: any[]; status: string; }

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/dewanshparashar/arbitrum-mcp'

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