Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

arbtrace_block

Retrieve detailed transaction trace data for any Arbitrum block to analyze execution paths, debug smart contracts, and monitor network activity.

Instructions

Get trace information for all transactions in a 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 trace

Implementation Reference

  • MCP tool handler for 'arbtrace_block': resolves RPC URL using chain name or provided URL, creates NitroNodeClient instance, calls traceBlock method, and returns JSON-formatted result.
    case "arbtrace_block": {
      const rpcUrl = await this.resolveRpcUrl(
        (args.rpcUrl as string) || (args.chainName as string)
      );
      const nodeClient = new NitroNodeClient(rpcUrl);
      const result = await nodeClient.traceBlock(
        args.blockNumOrHash as string
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the 'arbtrace_block' tool, specifying parameters like rpcUrl, chainName (optional), and required blockNumOrHash, along with description.
    {
      name: "arbtrace_block",
      description:
        "Get trace information for all transactions in a 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 trace",
          },
        },
        required: ["blockNumOrHash"],
      },
    },
  • src/index.ts:93-102 (registration)
    Registration of ListToolsRequestSchema handler that returns the list of available tools, including 'arbtrace_block' via getAvailableTools().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      try {
        console.error("Handling list tools request");
        return {
          tools: this.getAvailableTools(),
        };
      } catch (error) {
        console.error("Error in list tools handler:", error);
        throw error;
      }
  • Helper method traceBlock in NitroNodeClient that performs the actual RPC call to 'arbtrace_block' with blockNumOrHash parameter, handles errors gracefully.
    async traceBlock(blockNumOrHash: string): Promise<TraceResult> {
      try {
        const traces = await this.makeRpcCall("arbtrace_block", [blockNumOrHash]);
        return { traces };
      } catch (error) {
        return {
          traces: null,
          error: `Trace block 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 'requires trace API' prerequisite, which is useful context about authentication or capability requirements. However, it doesn't describe what 'trace information' includes, whether this is a read-only operation, potential rate limits, error conditions, or what happens if the block doesn't exist. For a tool with no annotation coverage, 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.

Conciseness4/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. The parenthetical '(requires trace API)' adds necessary context without verbosity. Every element earns its place, though it could be slightly more structured by separating the prerequisite into its own sentence.

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?

Given no annotations and no output schema, the description is incomplete for a tool that presumably returns complex trace data. It doesn't explain what 'trace information' includes, the format of the response, or potential limitations. For a tool interacting with blockchain trace APIs, this leaves the agent without crucial context about what to expect from the operation.

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 the schema already documents all three parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema. The baseline score of 3 is appropriate when the schema does the heavy lifting, though the description could have explained relationships between parameters (e.g., rpcUrl vs chainName precedence).

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 tool's purpose: 'Get trace information for all transactions in a block' - specifying the verb ('Get'), resource ('trace information'), and scope ('all transactions in a block'). It distinguishes from siblings like 'arbtrace_transaction' (single transaction) and 'arbtrace_filter' (filtered traces). However, it doesn't explicitly differentiate from 'arbtrace_replayBlockTransactions' which might overlap in functionality.

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 provides one explicit usage condition: '(requires trace API)', indicating a prerequisite. However, it doesn't specify when to use this tool versus alternatives like 'arbtrace_replayBlockTransactions' or 'arbtrace_filter', nor does it mention when NOT to use it. The guidance is implied but incomplete.

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