Skip to main content
Glama

get_supported_chains

Retrieve all blockchain networks available for cross-chain swaps through deBridge, including chain IDs and names for route planning.

Instructions

List all blockchain networks supported by deBridge for cross-chain swaps. Returns chain IDs and names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The registerGetSupportedChains function that registers the 'get_supported_chains' tool with the MCP server. It includes the tool handler that calls tokenDb.getChains() and returns the chains as JSON.
    export function registerGetSupportedChains(server: McpServer, tokenDb: TokenDb) {
      server.registerTool(
        "get_supported_chains",
        {
          description:
            "List all blockchain networks supported by deBridge for cross-chain swaps. Returns chain IDs and names.",
        },
        async () => {
          const chains = tokenDb.getChains();
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(chains),
              },
            ],
          };
        },
      );
    }
  • The getChains method in TokenDb class that retrieves and sorts all supported blockchain chains by name.
    getChains(): ChainInfo[] {
      return [...this.chains].sort((a, b) => a.chainNames[0].localeCompare(b.chainNames[0]));
    }
  • The ChainInfo interface that defines the structure of chain data returned by get_supported_chains, including chainId, debridgeSubscriptionId, and chainNames.
    export interface ChainInfo {
      /** Real blockchain chain ID. */
      chainId: string;
      /**
       * Synthetic deBridge-local ID used to avoid chainId overlaps across
       * different networks. Only present when it differs from chainId.
       * This is the identifier deBridge API calls expect as "chainId".
       */
      debridgeSubscriptionId?: string;
      chainNames: string[];
    }
  • src/server.ts:37-37 (registration)
    The registration call in createServer where registerGetSupportedChains is invoked to add the tool to the MCP server.
    registerGetSupportedChains(server, tokenDb);

Tool Definition Quality

Score is being calculated. Check back soon.

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/debridge-finance/de-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server