Skip to main content
Glama

fiatMap

Retrieve a mapping of supported fiat currencies to their unique CoinMarketCap IDs, with options for pagination, sorting, and including precious metals.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startNo
limitNo
sortNo
include_metalsNo

Implementation Reference

  • index.js:558-573 (registration)
    Registration of the 'fiatMap' tool on the MCP server, binding it to the CoinMarketCap /v1/fiat/map API endpoint.
    // /fiat/map
    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)
        })
      }
    )
  • The inline async handler for fiatMap that calls makeApiRequest with the /v1/fiat/map endpoint and formats the response.
    async (params) => {
      return handleEndpoint(async () => {
        const data = await makeApiRequest(apiKey, '/v1/fiat/map', params)
        return formatResponse(data)
      })
    }
  • Input schema for fiatMap using Zod: optional start (number), limit (number), sort (string), include_metals (boolean).
    {
      start: z.number().optional(),
      limit: z.number().optional(),
      sort: z.string().optional(),
      include_metals: z.boolean().optional()
    },
  • The makeApiRequest helper that sends HTTP GET requests to the CoinMarketCap pro API.
    async function makeApiRequest(apiKey, endpoint, params = {}) {
      const queryParams = new URLSearchParams()
      Object.entries(params).forEach(([key, value]) => {
        if (value !== undefined) {
          queryParams.append(key, value.toString())
        }
      })
    
      const url = `https://pro-api.coinmarketcap.com${endpoint}${queryParams.toString() ? `?${queryParams.toString()}` : ''}`
    
      const response = await fetch(url, {
        method: 'GET',
        headers: {
          'Accept': 'application/json',
          'X-CMC_PRO_API_KEY': apiKey,
        }
      })
    
      if (!response.ok) {
        throw new Error(`Error fetching data from CoinMarketCap: ${response.statusText}`)
      }
    
      return await response.json()
    }
  • The handleEndpoint helper that wraps API calls with try/catch error handling.
    async function handleEndpoint(apiCall) {
      try {
        return await apiCall()
      } catch (error) {
        return formatErrorResponse(error.message, error.status || 403)
      }
    }
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It does not mention that the operation is read-only, whether authentication is required, or any side effects. The statement is too brief for safe agent invocation.

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?

The description is a single sentence that directly states the tool's function. It is front-loaded with the core action and contains no extraneous information.

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

Completeness2/5

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

Given the lack of parameter documentation and output schema, the description is insufficient. It does not explain the structure of the returned mapping, pagination, or how the optional parameters influence the results. Sibling tools with better documentation highlight the gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 4 parameters with 0% description coverage. The description does not explain what 'start', 'limit', 'sort', or 'include_metals' do, nor how they affect the returned mapping. Agents cannot infer correct parameter usage.

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?

The description clearly states the tool returns a mapping of all supported fiat currencies to unique CoinMarketCap IDs. It uses a specific verb ('Returns') and resource ('mapping'), distinguishing it from sibling tools that deal with cryptocurrencies, DEX, etc.

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 vs. alternatives like cryptoCurrencyMap. It does not mention any preconditions, limitations, or typical use cases.

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

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