Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

search_chains

Find Arbitrum chains by name, chain ID, or partial name match when you have incomplete information about the network.

Instructions

Search for Arbitrum chains by name, chain ID, or partial name match. Perfect for finding chains when you have incomplete information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (chain name like 'Xai', 'Arbitrum One', chain ID like '42161', or partial name)

Implementation Reference

  • MCP tool handler that executes search_chains by calling ChainLookupService.searchChains with the provided query and formats the results as text response.
    case "search_chains": const searchResults = await this.chainLookupService.searchChains( args.query as string ); return { content: [ { type: "text", text: searchResults.length > 0 ? `Found chains:\n${searchResults .map((c) => `${c.name} (ID: ${c.chainId})`) .join("\n")}` : `No chains found matching "${args.query}"`, }, ], };
  • Input schema and metadata definition for the search_chains tool, specifying the required 'query' parameter.
    name: "search_chains", description: "Search for Arbitrum chains by name, chain ID, or partial name match. Perfect for finding chains when you have incomplete information.", inputSchema: { type: "object" as const, properties: { query: { type: "string", description: "Search query (chain name like 'Xai', 'Arbitrum One', chain ID like '42161', or partial name)", }, }, required: ["query"], }, },
  • Core helper function implementing the chain search logic: filters cached OrbitChainData by name, slug, or exact chain ID match.
    async searchChains(query: string): Promise<OrbitChainData[]> { await this.ensureChainsData(); const searchQuery = query.toLowerCase().trim(); return this.chainsData.filter(chain => chain.name.toLowerCase().includes(searchQuery) || chain.slug?.toLowerCase().includes(searchQuery) || chain.chainId.toString() === searchQuery ); }

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