search_chains
Quickly locate Arbitrum chains by name, chain ID, or partial match using this tool. Ideal for identifying chains with incomplete or partial information.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query (chain name like 'Xai', 'Arbitrum One', chain ID like '42161', or partial name) |
Implementation Reference
- src/services/chain-lookup.ts:229-239 (handler)Core handler function that performs the chain search by filtering the cached list of OrbitChainData based on name, slug, or chain ID matching the query.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 ); }
- src/index.ts:335-351 (registration)MCP tool call handler that invokes the searchChains method and formats the response as text content listing matching chains.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}"`, }, ], };
- src/index.ts:1048-1062 (schema)Tool schema definition including name, description, and input schema requiring a 'query' string 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"], }, },
- src/index.ts:1048-1062 (registration)Registration of the tool in the list of available tools returned by listTools.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"], }, },