Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

get_transaction_receipt

Retrieve transaction receipt details using a transaction hash on the Arbitrum network. Input the transaction hash to access status, logs, and gas usage.

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

  • MCP server handler for the 'get_transaction_receipt' tool. Resolves RPC URL or chain name, instantiates EthereumAccountClient, calls getTransactionReceipt with txHash argument, and returns the receipt as JSON text content.
    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), }, ], }; }
  • src/index.ts:1001-1018 (registration)
    Tool registration in getAvailableTools() method, defining the tool name, description, and input schema for listTools MCP request.
    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"], }, },
  • Helper function in EthereumAccountClient that performs the actual RPC call to 'eth_getTransactionReceipt', parses the raw response, and returns a structured Receipt object.
    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 returned by the tool.
    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