Skip to main content
Glama

sodax_get_supported_chains

Read-only

Retrieve a list of blockchain networks supported for cross-chain swaps and DeFi operations through the SODAX platform.

Instructions

List all blockchain networks supported by SODAX for cross-chain swaps and DeFi operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoResponse format: 'json' for raw data or 'markdown' for formatted textmarkdown

Implementation Reference

  • The MCP tool handler for sodax_get_supported_chains. This async function calls getSupportedChains() service and formats the response as JSON or Markdown based on the format parameter.
    server.tool(
      "sodax_get_supported_chains",
      "List all blockchain networks supported by SODAX for cross-chain swaps and DeFi operations",
      {
        format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN)
          .describe("Response format: 'json' for raw data or 'markdown' for formatted text")
      },
      READ_ONLY,
      async ({ format }) => {
        try {
          const chains = await getSupportedChains();
          return {
            content: [{
              type: "text",
              text: formatResponse(chains, format)
            }]
          };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }],
            isError: true
          };
        }
      }
    );
  • The core service function that fetches supported chains from the SODAX API endpoint /config/spoke/chains, with caching support.
    export async function getSupportedChains(): Promise<Chain[]> {
      const cacheKey = "chains";
      const cached = getCached<Chain[]>(cacheKey);
      if (cached) return cached;
    
      try {
        const response = await apiClient.get("/config/spoke/chains");
        // API returns array directly
        const chains = Array.isArray(response.data) ? response.data : (response.data?.data || []);
        setCache(cacheKey, chains);
        return chains;
      } catch (error) {
        console.error("Error fetching chains:", error);
        throw new Error("Failed to fetch supported chains from SODAX API");
      }
    }
  • Zod schema definition for the tool's input parameters - optional format field that accepts 'json' or 'markdown' (defaults to markdown).
    server.tool(
      "sodax_get_supported_chains",
      "List all blockchain networks supported by SODAX for cross-chain swaps and DeFi operations",
      {
        format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN)
          .describe("Response format: 'json' for raw data or 'markdown' for formatted text")
      },
  • TypeScript interface Chain that defines the structure of blockchain network data returned by the API (id, name, chainId, nativeCurrency, etc.).
    export interface Chain {
      id: string;
      name: string;
      chainId: number;
      nativeCurrency: {
        name: string;
        symbol: string;
        decimals: number;
      };
      rpcUrl?: string;
      explorerUrl?: string;
      iconUrl?: string;
      isTestnet?: boolean;
    }
  • src/index.ts:42-42 (registration)
    Registration call where registerSodaxApiTools(server) is invoked to register all SODAX API tools including sodax_get_supported_chains with the MCP server.
    registerSodaxApiTools(server);
Behavior4/5

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

Annotations already indicate read-only, non-destructive, and open-world behavior. The description adds value by specifying the tool lists 'all' networks and the context of 'cross-chain swaps and DeFi operations', which provides useful behavioral context beyond annotations, though it doesn't detail rate limits or response structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('List all blockchain networks') and includes necessary context ('supported by SODAX for cross-chain swaps and DeFi operations'). There is no wasted verbiage, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 optional parameter), rich annotations (read-only, non-destructive, open-world), and no output schema, the description is mostly complete. It covers the purpose and context well, though it could benefit from more explicit usage guidelines or output details to achieve a perfect score.

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%, with the 'format' parameter fully documented in the schema. The description does not add any parameter-specific information beyond the schema, so it meets the baseline of 3 without compensating or adding extra meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all blockchain networks supported by SODAX'), specifying the purpose for 'cross-chain swaps and DeFi operations'. It distinguishes from siblings like 'sodax_get_swap_tokens' (which lists tokens) and 'sodax_get_money_market_assets' (which lists assets), making the scope explicit.

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 implies usage for cross-chain swaps and DeFi operations, providing some context, but does not explicitly state when to use this tool versus alternatives like 'sodax_get_swap_tokens' or 'sodax_get_partners'. No exclusions or prerequisites are mentioned, leaving gaps in guidance.

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/gosodax/sodax-builders-mcp'

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