Skip to main content
Glama

sodax_get_money_market_tokens

Read-only

Retrieve tokens available for money market lending and borrowing across multiple chains. Optionally filter by chain ID to narrow results.

Instructions

Get tokens supported for money market lending/borrowing, optionally filtered by chain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainIdNoFilter by chain ID
formatNoResponse format: 'json' for raw data or 'markdown' for formatted textmarkdown

Implementation Reference

  • MCP tool handler for 'sodax_get_money_market_tokens'. Registered via server.tool() with optional chainId and format parameters. Calls getMoneyMarketTokens() from the service layer and formats the response.
    // Tool 15: Get Money Market Tokens
    server.tool(
      "sodax_get_money_market_tokens",
      "Get tokens supported for money market lending/borrowing, optionally filtered by chain",
      {
        chainId: z.string().optional()
          .describe("Filter by chain ID"),
        format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN)
          .describe("Response format: 'json' for raw data or 'markdown' for formatted text")
      },
      READ_ONLY,
      async ({ chainId, format }) => {
        try {
          const tokens = await getMoneyMarketTokens(chainId);
          const header = chainId
            ? `## Money Market Tokens on ${chainId}\n\n`
            : `## Money Market Tokens\n\n`;
          return {
            content: [{
              type: "text",
              text: header + formatResponse(tokens, format)
            }]
          };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }],
            isError: true
          };
        }
      }
    );
  • The actual API-fetching function getMoneyMarketTokens(). Makes an HTTP GET request to /config/money-market/tokens or /config/money-market/:chainId/tokens, with in-memory caching.
    /**
     * Get money market supported tokens
     */
    export async function getMoneyMarketTokens(chainId?: string): Promise<unknown> {
      const cacheKey = `mm-tokens-${chainId || "all"}`;
      const cached = getCached<unknown>(cacheKey);
      if (cached) return cached;
    
      try {
        const endpoint = chainId ? `/config/money-market/${chainId}/tokens` : "/config/money-market/tokens";
        const response = await apiClient.get(endpoint);
        setCache(cacheKey, response.data);
        return response.data;
      } catch (error) {
        console.error("Error fetching money market tokens:", error);
        throw new Error("Failed to fetch money market tokens from SODAX API");
      }
    }
  • src/index.ts:227-236 (registration)
    Registration of the tool name 'sodax_get_money_market_tokens' in the server's config tools listing.
    config: [
      "sodax_get_supported_chains",
      "sodax_get_swap_tokens",
      "sodax_get_all_config",
      "sodax_get_relay_chain_id_map",
      "sodax_get_all_chains_configs",
      "sodax_get_hub_assets",
      "sodax_get_money_market_tokens",
      "sodax_get_money_market_reserve_assets"
    ],
  • Input schema for the tool: optional chainId (string) and format (ResponseFormat enum, defaulting to MARKDOWN).
    {
      chainId: z.string().optional()
        .describe("Filter by chain ID"),
      format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN)
        .describe("Response format: 'json' for raw data or 'markdown' for formatted text")
    },
  • Analytics mapping assigning this tool to the 'api' group for PostHog tracking.
    sodax_get_money_market_tokens: "api",
    sodax_get_money_market_reserve_assets: "api",
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, indicating a safe read operation. The description adds no behavioral traits beyond what annotations provide (e.g., no mention of return format or side effects). No contradiction exists.

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

Conciseness4/5

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

The description is a single sentence of 12 words, efficiently conveying the core purpose. It is front-loaded and avoids unnecessary words, though it could include a brief usage tip without becoming verbose.

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

Completeness3/5

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

For a simple tool with two optional parameters and no output schema, the description is minimally adequate. However, it does not describe the return value structure (e.g., list of tokens with addresses/symbols), which would help agents interpret results.

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 coverage is 100%, so both parameters are documented. The description adds only the context of 'optionally filtered by chain', which corresponds to the chainId parameter. No additional meaning is provided for the format parameter beyond schema.

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

Purpose4/5

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

The description clearly states 'Get tokens supported for money market lending/borrowing', which identifies the specific resource and action. It also mentions optional chain filtering, though it does not explicitly distinguish from sibling tools like sodax_get_money_market_asset or sodax_get_money_market_assets.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any preconditions or exclusions. It only implies usage for fetching tokens, but lacks context for decision-making.

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

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