Skip to main content
Glama

sodax_get_asset_suppliers

Read-only

Get a list of suppliers lending to a money market asset by providing its reserve contract address.

Instructions

Get suppliers (lenders) for a specific money market asset by its reserve address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reserveAddressYesThe reserve contract address of the asset
offsetNoNumber of suppliers to skip for pagination
limitNoMaximum number of suppliers to return (1-100)
formatNoResponse format: 'json' for raw data or 'markdown' for formatted textmarkdown

Implementation Reference

  • MCP tool handler for sodax_get_asset_suppliers — registers the tool with server.tool(), defines Zod schema (reserveAddress, offset, limit, format), calls getMoneyMarketAssetSuppliers() service function, and formats the response.
    // Tool 23: Get Money Market Asset Suppliers
    server.tool(
      "sodax_get_asset_suppliers",
      "Get suppliers (lenders) for a specific money market asset by its reserve address",
      {
        reserveAddress: z.string()
          .describe("The reserve contract address of the asset"),
        offset: z.number().min(0).optional().default(0)
          .describe("Number of suppliers to skip for pagination"),
        limit: z.number().min(1).max(100).optional().default(20)
          .describe("Maximum number of suppliers to return (1-100)"),
        format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN)
          .describe("Response format: 'json' for raw data or 'markdown' for formatted text")
      },
      READ_ONLY,
      async ({ reserveAddress, offset, limit, format }) => {
        try {
          const suppliers = await getMoneyMarketAssetSuppliers(reserveAddress, { offset, limit });
          return {
            content: [{
              type: "text",
              text: `## Suppliers for ${reserveAddress.slice(0, 10)}...\n\n` + formatResponse(suppliers, format)
            }]
          };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }],
            isError: true
          };
        }
      }
    );
  • Zod schema definitions for sodax_get_asset_suppliers: reserveAddress (string), offset (optional number, default 0), limit (optional number 1-100, default 20), format (enum JSON/Markdown, default Markdown).
    {
      reserveAddress: z.string()
        .describe("The reserve contract address of the asset"),
      offset: z.number().min(0).optional().default(0)
        .describe("Number of suppliers to skip for pagination"),
      limit: z.number().min(1).max(100).optional().default(20)
        .describe("Maximum number of suppliers to return (1-100)"),
      format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN)
        .describe("Response format: 'json' for raw data or 'markdown' for formatted text")
    },
  • API service function getMoneyMarketAssetSuppliers — fetches GET /moneymarket/asset/:reserveAddress/suppliers from the SODAX API with optional offset and limit query params.
    export async function getMoneyMarketAssetSuppliers(
      reserveAddress: string,
      options?: { offset?: number; limit?: number }
    ): Promise<unknown> {
      try {
        const params = new URLSearchParams();
        if (options?.offset) params.append("offset", options.offset.toString());
        if (options?.limit) params.append("limit", options.limit.toString());
    
        const queryString = params.toString();
        const url = `/moneymarket/asset/${reserveAddress}/suppliers${queryString ? `?${queryString}` : ""}`;
        const response = await apiClient.get(url);
        return response.data;
      } catch (error) {
        console.error("Error fetching asset suppliers:", error);
        throw new Error("Failed to fetch money market asset suppliers from SODAX API");
      }
    }
  • src/index.ts:254-255 (registration)
    Registration of sodax_get_asset_suppliers in the tool listing for the /api endpoint under the moneyMarket category group.
    "sodax_get_asset_suppliers",
    "sodax_get_all_borrowers"
  • API drift check contract for sodax_get_asset_suppliers — maps endpoint GET /moneymarket/asset/:reserveAddress/suppliers with expected params (reserveAddress, offset, limit) and response fields (suppliers, total, offset, limit).
    "GET /moneymarket/asset/:reserveAddress/suppliers": {
      tool: "sodax_get_asset_suppliers",
      params: ["reserveAddress", "offset", "limit"],
      requiredParams: ["reserveAddress"],
      responseFields: ["suppliers", "total", "offset", "limit"],
    },
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so no contradiction. Description adds domain context (money market) but no additional behavioral traits beyond annotations. Bar is lower due to annotations, but description doesn't add new behavioral info.

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?

Single sentence, no fluff, front-loaded with verb and resource. Every word earns its place.

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?

No output schema, so description should explain return structure. It only says 'suppliers (lenders)' without details on what is returned per supplier (e.g., address, amount). Also lacks mention of pagination behavior, though schema covers parameters. Incomplete for a tool with no output schema.

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%, so parameters are well-documented in schema. Description does not add extra meaning beyond what's already in schema. Baseline 3 applies.

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?

Description clearly states verb 'Get' and resource 'suppliers (lenders)' for a specific money market asset by reserve address. It distinguishes from sibling tools like sodax_get_asset_borrowers.

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?

Implies usage when you have a reserve address, but does not explicitly mention when not to use or provide alternatives among sibling tools. Lacks explicit context for agent decision.

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