Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

get_rollup_address

Retrieve the rollup contract address for specific Arbitrum chains like Xai or Nova. Ideal for direct queries and integrations requiring precise chain address information.

Instructions

Get the rollup contract address for a specific Arbitrum chain. Use this for direct rollup address queries like 'what's the rollup address of Xai?', 'Xai rollup contract', or 'rollup address for Arbitrum One'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesChain name to get rollup address for (e.g., 'Xai', 'Arbitrum One', 'Nova')

Implementation Reference

  • Handler for the get_rollup_address tool. Looks up the chain by name using ChainLookupService and returns the rollup contract address if available, with appropriate error messages.
    case "get_rollup_address": const rollupChainInfo = await this.chainLookupService.findChainByName( args.chainName as string ); if (!rollupChainInfo) { return { content: [ { type: "text", text: `Chain "${args.chainName}" not found`, }, ], }; } if (!rollupChainInfo.rollup) { return { content: [ { type: "text", text: `Rollup contract address not available for ${rollupChainInfo.name}`, }, ], }; } return { content: [ { type: "text", text: `${rollupChainInfo.name} rollup contract address: ${rollupChainInfo.rollup}`, }, ], };
  • src/index.ts:1079-1094 (registration)
    Tool registration including name, description, and input schema (requires chainName string). Part of getAvailableTools() which is used in ListToolsRequestSchema handler.
    { name: "get_rollup_address", description: "Get the rollup contract address for a specific Arbitrum chain. Use this for direct rollup address queries like 'what's the rollup address of Xai?', 'Xai rollup contract', or 'rollup address for Arbitrum One'.", inputSchema: { type: "object" as const, properties: { chainName: { type: "string", description: "Chain name to get rollup address for (e.g., 'Xai', 'Arbitrum One', 'Nova')", }, }, required: ["chainName"], }, },
  • Helper method in ChainLookupService that finds OrbitChainData by name (exact, slug, or partial match), providing the chain data including rollup address used by the tool handler.
    async findChainByName(name: string): Promise<OrbitChainData | null> { await this.ensureChainsData(); const searchName = name.toLowerCase().trim(); // Try exact name match first let chain = this.chainsData.find(chain => chain.name.toLowerCase() === searchName ); if (!chain) { // Try slug match chain = this.chainsData.find(chain => chain.slug?.toLowerCase() === searchName ); } if (!chain) { // Try partial name match chain = this.chainsData.find(chain => chain.name.toLowerCase().includes(searchName) || searchName.includes(chain.name.toLowerCase()) ); } return chain || null; }

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