Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

arbtrace_callMany

Batch trace multiple calls on Arbitrum nodes using the trace API. Streamlines analysis by resolving chain names and handling block-specific queries efficiently.

Instructions

Trace multiple calls in batch for efficiency (requires trace API)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockNumOrHashNoBlock number or hash (defaults to 'latest')
callsYesArray of call objects to trace
chainNameNoChain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL
rpcUrlNoThe RPC URL of the Arbitrum node (optional if default is set)

Implementation Reference

  • MCP server handler for the 'arbtrace_callMany' tool. Resolves the RPC URL (from args or chain name), instantiates NitroNodeClient, calls its traceCallMany method, and returns the result as text content.
    case "arbtrace_callMany": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const nodeClient = new NitroNodeClient(rpcUrl); const result = await nodeClient.traceCallMany( args.calls as any[], args.blockNumOrHash as string ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Input schema definition for the arbtrace_callMany tool, defining parameters like rpcUrl, chainName, calls (required), and blockNumOrHash.
    name: "arbtrace_callMany", description: "Trace multiple calls in batch for efficiency (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", }, calls: { type: "array", description: "Array of call objects to trace", items: { type: "object" }, }, blockNumOrHash: { type: "string", description: "Block number or hash (defaults to 'latest')", }, }, required: ["calls"], }, },
  • Helper method in NitroNodeClient that makes the actual RPC call to 'arbtrace_callMany' on the Arbitrum Nitro node, handling errors and returning TraceResult.
    async traceCallMany( calls: any[], blockNumOrHash?: string ): Promise<TraceResult> { try { const traces = await this.makeRpcCall("arbtrace_callMany", [ calls, blockNumOrHash || "latest", ]); return { traces }; } catch (error) { return { traces: null, error: `Trace callMany not supported on this RPC endpoint: ${ (error as Error).message }`, }; } }

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