Skip to main content
Glama

sodax_get_token_supply

Retrieve SODA token supply data including total, circulating, and burned amounts in JSON or markdown format.

Instructions

Get SODA token supply information including total, circulating, and burned amounts

Input Schema

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

Implementation Reference

  • Core implementation of getTokenSupply() service function that fetches SODA token supply data from the SODAX API endpoint '/sodax/supply'. Includes caching logic and error handling.
    /** * Get SODA token supply info */ export async function getTokenSupply(): Promise<TokenSupply> { const cacheKey = "token-supply"; const cached = getCached<TokenSupply>(cacheKey); if (cached) return cached; try { const response = await apiClient.get("/sodax/supply"); // API returns data directly const supply = response.data?.data || response.data; setCache(cacheKey, supply); return supply; } catch (error) { console.error("Error fetching token supply:", error); throw new Error("Failed to fetch token supply from SODAX API"); } }
  • MCP tool registration for 'sodax_get_token_supply' with server.tool(). Defines input schema (format parameter) and the handler that calls getTokenSupply() and formats the response.
    // Tool 10: Get Token Supply server.tool( "sodax_get_token_supply", "Get SODA token supply information including total, circulating, and burned amounts", { 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 supply = await getTokenSupply(); return { content: [{ type: "text", text: `## SODA Token Supply\n\n` + formatResponse(supply, format) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }], isError: true }; } } );
  • Type definition for TokenSupply interface defining the structure of token supply data including totalSupply, circulatingSupply, burnedSupply, lockedSupply, maxSupply, priceUsd, and marketCapUsd.
    /** * SODA token supply info */ export interface TokenSupply { totalSupply: string; circulatingSupply: string; burnedSupply?: string; lockedSupply?: string; maxSupply?: string; priceUsd?: number; marketCapUsd?: number; }
  • Analytics mapping that associates 'sodax_get_token_supply' with the 'api' group for PostHog tracking of tool usage.
    sodax_get_partners: "api", sodax_get_token_supply: "api",
  • API documentation listing showing 'sodax_get_token_supply' as one of the available tools in the /api endpoint response.
    "sodax_get_token_supply",

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