Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

arbtrace_replayBlockTransactions

Replay and trace all transactions in a specific Arbitrum block to analyze execution details and state changes using trace API data.

Instructions

Replay and trace all transactions in a specific block (requires trace API)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rpcUrlNoThe RPC URL of the Arbitrum node (optional if default is set)
chainNameNoChain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL
blockNumOrHashYesBlock number or hash to replay
traceTypesNoArray of trace types (e.g., ['trace', 'stateDiff'])

Implementation Reference

  • MCP tool handler in the CallToolRequestSchema switch statement. Instantiates NitroNodeClient with resolved RPC URL and calls its replayBlockTransactions method with provided arguments, returning JSON-stringified result.
    case "arbtrace_replayBlockTransactions": {
      const rpcUrl = await this.resolveRpcUrl(
        (args.rpcUrl as string) || (args.chainName as string)
      );
      const nodeClient = new NitroNodeClient(rpcUrl);
      const result = await nodeClient.replayBlockTransactions(
        args.blockNumOrHash as string,
        (args.traceTypes as string[]) || ["trace"]
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Tool schema definition including name, description, and inputSchema for validation. Part of the tools array returned by getAvailableTools() for tool registration/discovery.
      name: "arbtrace_replayBlockTransactions",
      description:
        "Replay and trace all transactions in a specific block (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",
          },
          blockNumOrHash: {
            type: "string",
            description: "Block number or hash to replay",
          },
          traceTypes: {
            type: "array",
            description:
              "Array of trace types (e.g., ['trace', 'stateDiff'])",
            items: { type: "string" },
          },
        },
        required: ["blockNumOrHash"],
      },
    },
  • Supporting method in NitroNodeClient that performs the actual RPC call to 'arbtrace_replayBlockTransactions' on the node, handles errors, and returns TraceResult.
    async replayBlockTransactions(
      blockNumOrHash: string,
      traceTypes: string[]
    ): Promise<TraceResult> {
      try {
        const traces = await this.makeRpcCall(
          "arbtrace_replayBlockTransactions",
          [blockNumOrHash, traceTypes]
        );
        return { traces };
      } catch (error) {
        return {
          traces: null,
          error: `Trace replayBlockTransactions not supported on this RPC endpoint: ${
            (error as Error).message
          }`,
        };
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the trace API requirement but doesn't describe what 'replay' entails (e.g., simulated execution, state changes), potential performance impacts, rate limits, authentication needs, or output format. For a tool with 'replay' in its name and no annotations, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and key requirement. Every word earns its place with zero waste or redundancy, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool named 'replayBlockTransactions' with no annotations and no output schema, the description is insufficient. It doesn't explain what 'replay' means operationally, what the trace output looks like, performance characteristics, or error conditions. Given the complexity implied by 'replay' and tracing, more context is needed for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are well-documented in the schema itself. The description doesn't add any parameter-specific semantics beyond what's in the schema (e.g., explaining trace types in more detail, clarifying blockNumOrHash format, or elaborating on RPC URL resolution). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Replay and trace') and resource ('all transactions in a specific block'), with the specific requirement 'requires trace API' distinguishing it from basic block retrieval tools. However, it doesn't explicitly differentiate from sibling tools like 'arbtrace_block' or 'arbtrace_transaction' that might handle similar tracing operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context with 'requires trace API', suggesting this tool is for detailed transaction analysis rather than basic block data. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'arbtrace_block' or 'arbtrace_replayTransaction', nor does it mention prerequisites beyond the trace API requirement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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