Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

assertion_status

Monitor assertion creation and confirmation activity to track rollup validation status and finality for Arbitrum chains.

Instructions

Monitor assertion creation and confirmation activity. Tracks NodeCreated vs NodeConfirmed events to understand rollup validation status. Critical for PM and support teams to monitor chain security and finality.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rpcUrlNoThe RPC URL of the Arbitrum chain (optional if default is set)
chainNameNoChain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL
parentRpcUrlYesParent chain RPC URL (e.g., Ethereum mainnet RPC)
rollupAddressYesRollup contract address

Implementation Reference

  • MCP tool handler for 'assertion_status': resolves RPC URL or chain name, instantiates ArbitrumChainClient, calls getAssertionStatus with parentRpcUrl and rollupAddress, returns JSON-stringified result.
    case "assertion_status": {
      const rpcUrl = await this.resolveRpcUrl(
        (args.rpcUrl as string) || (args.chainName as string)
      );
      const chainDataClient = new ArbitrumChainClient(rpcUrl);
      const status = await chainDataClient.getAssertionStatus(
        args.parentRpcUrl as string,
        args.rollupAddress as string
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(status, null, 2),
          },
        ],
      };
    }
  • src/index.ts:1591-1619 (registration)
    Tool registration entry in getAvailableTools(): defines name 'assertion_status', detailed description, and inputSchema requiring parentRpcUrl and rollupAddress.
    {
      name: "assertion_status",
      description:
        "Monitor assertion creation and confirmation activity. Tracks NodeCreated vs NodeConfirmed events to understand rollup validation status. Critical for PM and support teams to monitor chain security and finality.",
      inputSchema: {
        type: "object" as const,
        properties: {
          rpcUrl: {
            type: "string",
            description:
              "The RPC URL of the Arbitrum chain (optional if default is set)",
          },
          chainName: {
            type: "string",
            description:
              "Chain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL",
          },
          parentRpcUrl: {
            type: "string",
            description: "Parent chain RPC URL (e.g., Ethereum mainnet RPC)",
          },
          rollupAddress: {
            type: "string",
            description: "Rollup contract address",
          },
        },
        required: ["parentRpcUrl", "rollupAddress"],
      },
    },
  • TypeScript interface AssertionStatus defining the structure of the tool's output: latest created/confirmed assertions, gap between them, and summary.
    export interface AssertionStatus {
      latestCreatedAssertion: string | null;
      latestConfirmedAssertion: string | null;
      creationConfirmationGap: string;
      summary: string;
    }
  • Helper method getAssertionStatus in ArbitrumChainClient: fetches recent logs for NodeCreated and NodeConfirmed events from rollupAddress on parentRpcUrl, computes latest assertions and confirmation gap.
    async getAssertionStatus(
      parentRpcUrl: string,
      rollupAddress: string
    ): Promise<AssertionStatus> {
      try {
        const parentClient = createPublicClient({
          transport: http(parentRpcUrl),
        });
    
        const nodeCreatedEventAbi = {
          anonymous: false,
          inputs: [
            { indexed: true, name: "nodeNum", type: "uint64" },
            { indexed: true, name: "parentNodeHash", type: "bytes32" },
            { indexed: true, name: "nodeHash", type: "bytes32" },
            { indexed: false, name: "executionHash", type: "bytes32" },
          ],
          name: "NodeCreated",
          type: "event",
        } as const;
    
        const nodeConfirmedEventAbi = {
          anonymous: false,
          inputs: [
            { indexed: true, name: "nodeNum", type: "uint64" },
            { indexed: false, name: "blockHash", type: "bytes32" },
            { indexed: false, name: "sendRoot", type: "bytes32" },
          ],
          name: "NodeConfirmed",
          type: "event",
        } as const;
    
        const latestBlockNumber = await parentClient.getBlockNumber();
        const fromBlock = latestBlockNumber - BigInt(50000);
    
        const [createdLogs, confirmedLogs] = await Promise.all([
          parentClient.getLogs({
            address: rollupAddress as `0x${string}`,
            event: nodeCreatedEventAbi,
            fromBlock,
            toBlock: latestBlockNumber,
          }),
          parentClient.getLogs({
            address: rollupAddress as `0x${string}`,
            event: nodeConfirmedEventAbi,
            fromBlock,
            toBlock: latestBlockNumber,
          })
        ]);
    
        const latestCreatedAssertion = createdLogs.length > 0 
          ? createdLogs[createdLogs.length - 1].args?.nodeNum || null
          : null;
    
        const latestConfirmedAssertion = confirmedLogs.length > 0 
          ? confirmedLogs[confirmedLogs.length - 1].args?.nodeNum || null
          : null;
    
        const creationConfirmationGap = (latestCreatedAssertion && latestConfirmedAssertion) 
          ? latestCreatedAssertion - latestConfirmedAssertion 
          : 0n;
    
        const summary = `Latest created assertion: ${latestCreatedAssertion || 'None'}, Latest confirmed: ${latestConfirmedAssertion || 'None'}. Gap: ${creationConfirmationGap}`;
    
        return {
          latestCreatedAssertion: latestCreatedAssertion ? latestCreatedAssertion.toString() : null,
          latestConfirmedAssertion: latestConfirmedAssertion ? latestConfirmedAssertion.toString() : null,
          creationConfirmationGap: creationConfirmationGap.toString(),
          summary
        };
      } catch (error) {
        return {
          latestCreatedAssertion: null,
          latestConfirmedAssertion: null,
          creationConfirmationGap: "0",
          summary: `Error checking assertions: ${error instanceof Error ? error.message : 'Unknown error'}`
        };
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes what the tool monitors (assertion activity, rollup validation status) but lacks critical behavioral details: whether this is a read-only operation, if it requires specific permissions, how data is returned (e.g., real-time monitoring vs historical query), or any rate limits. The description doesn't contradict annotations (none exist), but it's insufficient for a mutation/query tool with zero annotation coverage.

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 appropriately sized (three sentences) and front-loaded with the core purpose. Each sentence adds value: the first states what it does, the second elaborates on tracking specifics, and the third provides usage context. There's minimal waste, though the third sentence could be more integrated with the first two.

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 monitoring tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on what the tool returns (e.g., event logs, status summaries), behavioral constraints (e.g., read-only, permissions needed), and how parameters affect output. The high schema coverage helps with inputs, but overall context for agent invocation remains inadequate.

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 4 parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema (e.g., it doesn't explain how parameters interact or affect monitoring behavior). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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: 'Monitor assertion creation and confirmation activity' with specific tracking of 'NodeCreated vs NodeConfirmed events'. It distinguishes itself from siblings by focusing on rollup validation status monitoring rather than general chain operations or debugging. However, it doesn't explicitly contrast with specific sibling tools like 'comprehensive_chain_status' or 'sync_status'.

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 implied usage context: 'Critical for PM and support teams to monitor chain security and finality.' This suggests when the tool is valuable but doesn't explicitly state when to use it versus alternatives like 'comprehensive_chain_status' or 'sync_status'. No specific exclusions or prerequisites are mentioned.

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