sodax_get_total_supply
Get SODA token total supply as a plain number, with output in JSON or markdown.
Instructions
Get SODA token total supply as a plain number
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Response format: 'json' for raw data or 'markdown' for formatted text | markdown |
Implementation Reference
- src/tools/sodaxApi.ts:943-967 (handler)MCP tool handler for 'sodax_get_total_supply'. Registers the tool with a 'format' parameter, calls getTotalSupply() from the service layer, and formats the response as markdown (default) or JSON.
server.tool( "sodax_get_total_supply", "Get SODA token total supply as a plain number", { 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 getTotalSupply(); return { content: [{ type: "text", text: `## SODA Total Supply\n\n` + formatResponse(supply, format) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }], isError: true }; } } ); - src/services/sodaxApi.ts:621-629 (helper)Service-layer helper function that calls the SODAX API endpoint GET /sodax/total_supply and returns the response data.
export async function getTotalSupply(): Promise<unknown> { try { const response = await apiClient.get("/sodax/total_supply"); return response.data; } catch (error) { console.error("Error fetching total supply:", error); throw new Error("Failed to fetch total supply from SODAX API"); } } - src/index.ts:257-264 (registration)Registration of the tool in the 'partnersAndToken' group within the main tool registry/config.
partnersAndToken: [ "sodax_get_partners", "sodax_get_partner_summary", "sodax_get_token_supply", "sodax_get_total_supply", "sodax_get_circulating_supply", "sodax_refresh_cache" ], - src/services/analytics.ts:62-64 (registration)Maps the tool name to the 'api' group in the analytics tool group resolver.
sodax_get_total_supply: "api", sodax_get_circulating_supply: "api", sodax_refresh_cache: "api", - src/services/apiDriftCheck.ts:215-219 (registration)Drift check mapping: links the API endpoint GET /sodax/total_supply to the tool name for monitoring API contract changes.
"GET /sodax/total_supply": { tool: "sodax_get_total_supply", params: [], requiredParams: [], },