Skip to main content
Glama

fiatMap

Map all supported fiat currencies to unique IDs with this utility. Organize, sort, and include metals for streamlined fiat currency identification and integration.

Instructions

Returns a mapping of all supported fiat currencies to unique CoinMarketCap IDs.

Input Schema

NameRequiredDescriptionDefault
include_metalsNo
limitNo
sortNo
startNo

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "include_metals": { "type": "boolean" }, "limit": { "type": "number" }, "sort": { "type": "string" }, "start": { "type": "number" } }, "type": "object" }

Implementation Reference

  • index.js:559-573 (registration)
    Full registration of the 'fiatMap' MCP tool, including description, input schema with Zod validation, and inline async handler function that proxies to CoinMarketCap /v1/fiat/map API endpoint.
    server.tool("fiatMap", "Returns a mapping of all supported fiat currencies to unique CoinMarketCap IDs.", { start: z.number().optional(), limit: z.number().optional(), sort: z.string().optional(), include_metals: z.boolean().optional() }, async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v1/fiat/map', params) return formatResponse(data) }) } )
  • Inline handler function executing the core logic of fiatMap: calls handleEndpoint helper to make API request to '/v1/fiat/map' and format response.
    async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v1/fiat/map', params) return formatResponse(data) }) }
  • Zod schema for input parameters to fiatMap tool: pagination (start, limit), sorting (sort), and option to include metals.
    { start: z.number().optional(), limit: z.number().optional(), sort: z.string().optional(), include_metals: z.boolean().optional() },
  • Helper function used by fiatMap handler for error handling and calling the API logic.
    async function handleEndpoint(apiCall) { try { return await apiCall() } catch (error) { return formatErrorResponse(error.message, error.status || 403) } }

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/shinzo-labs/coinmarketcap-mcp'

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