arbtrace_get
Retrieve specific trace data from Arbitrum transactions using a defined path to analyze transaction execution details and debug smart contract interactions.
Instructions
Get specific trace data at a given path within a transaction (requires trace API)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rpcUrl | No | The RPC URL of the Arbitrum node (optional if default is set) | |
| chainName | No | Chain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL | |
| txHash | Yes | Transaction hash | |
| path | No | Path to specific trace data |
Implementation Reference
- src/index.ts:560-577 (handler)The MCP tool handler implementation for 'arbtrace_get'. It resolves the RPC URL from chainName or rpcUrl, creates a NitroNodeClient instance, calls its traceGet method with the provided txHash and path, and returns the result as JSON text content.case "arbtrace_get": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const nodeClient = new NitroNodeClient(rpcUrl); const result = await nodeClient.traceGet( args.txHash as string, (args.path as string[]) || [] ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:1323-1351 (registration)Registration of the 'arbtrace_get' tool in the getAvailableTools() method, which is returned in response to listTools requests. Includes the tool name, description, and input schema definition.name: "arbtrace_get", description: "Get specific trace data at a given path within a transaction (requires trace API)", inputSchema: { type: "object" as const, properties: { rpcUrl: { type: "string", description: "The RPC URL of the Arbitrum node (optional if default is set)", }, chainName: { type: "string", description: "Chain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL", }, txHash: { type: "string", description: "Transaction hash", }, path: { type: "array", description: "Path to specific trace data", items: { type: "string" }, }, }, required: ["txHash"], }, },
- Supporting method in NitroNodeClient that performs the actual 'arbtrace_get' RPC call to the Arbitrum node with txHash and path parameters, handling errors and returning TraceResult.async traceGet(txHash: string, path: string[]): Promise<TraceResult> { try { const traces = await this.makeRpcCall("arbtrace_get", [txHash, path]); return { traces }; } catch (error) { return { traces: null, error: `Trace get not supported on this RPC endpoint: ${ (error as Error).message }`, }; } }