arbtrace_filter
Filter and analyze transaction traces on Arbitrum networks using specific criteria. Supports custom filters, RPC URLs, and chain identification for precise trace data extraction.
Instructions
Filter traces based on specified criteria (requires trace API)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainName | No | Chain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL | |
| filter | Yes | Filter criteria for traces | |
| rpcUrl | No | The RPC URL of the Arbitrum node (optional if default is set) |
Implementation Reference
- src/index.ts:597-611 (handler)MCP tool handler for 'arbtrace_filter': resolves RPC URL or chain name, instantiates NitroNodeClient, calls traceFilter with the provided filter, and returns the result as JSON text content.case "arbtrace_filter": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const nodeClient = new NitroNodeClient(rpcUrl); const result = await nodeClient.traceFilter(args.filter); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:1378-1401 (schema)Input schema definition for the 'arbtrace_filter' tool, including optional rpcUrl/chainName and required filter object.name: "arbtrace_filter", description: "Filter traces based on specified criteria (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", }, filter: { type: "object", description: "Filter criteria for traces", }, }, required: ["filter"], }, },
- Helper method in NitroNodeClient that performs the actual RPC call to 'arbtrace_filter' with the filter parameter and handles errors.async traceFilter(filter: any): Promise<TraceResult> { try { const traces = await this.makeRpcCall("arbtrace_filter", [filter]); return { traces }; } catch (error) { return { traces: null, error: `Trace filter not supported on this RPC endpoint: ${ (error as Error).message }`, }; } }