Skip to main content
Glama

cryptoCurrencyMap

Retrieve a mapping of all cryptocurrencies to their unique CoinMarketCap IDs. Filter by status, start, limit, sort, symbol, or auxiliary fields.

Instructions

Returns a mapping of all cryptocurrencies to unique CoinMarketCap IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listing_statusNo
startNo
limitNo
sortNo
symbolNo
auxNo

Implementation Reference

  • index.js:158-180 (registration)
    Registration of the 'cryptoCurrencyMap' tool on the MCP server with Zod schema for parameters.
    server.tool("cryptoCurrencyMap",
      "Returns a mapping of all cryptocurrencies to unique CoinMarketCap IDs.",
      {
        listing_status: z.string().optional(),
        start: z.number().optional(),
        limit: z.number().optional(),
        sort: z.string().optional(),
        symbol: z.string().optional(),
        aux: z.string().optional()
      },
      async ({ listing_status = 'active', start = 1, limit = 100, sort = 'id', symbol, aux }) => {
        return handleEndpoint(async () => {
          return await makeApiRequestWithErrorHandling(apiKey, '/v1/cryptocurrency/map', {
            listing_status,
            start,
            limit,
            sort,
            symbol,
            aux
          })
        })
      }
    )
  • Zod schema defining input parameters: listing_status, start, limit, sort, symbol, aux.
    {
      listing_status: z.string().optional(),
      start: z.number().optional(),
      limit: z.number().optional(),
      sort: z.string().optional(),
      symbol: z.string().optional(),
      aux: z.string().optional()
    },
  • Handler function that calls the CoinMarketCap /v1/cryptocurrency/map endpoint with default parameters (listing_status='active', start=1, limit=100, sort='id') and returns formatted response.
    async ({ listing_status = 'active', start = 1, limit = 100, sort = 'id', symbol, aux }) => {
      return handleEndpoint(async () => {
        return await makeApiRequestWithErrorHandling(apiKey, '/v1/cryptocurrency/map', {
          listing_status,
          start,
          limit,
          sort,
          symbol,
          aux
        })
      })
    }
  • Wrapper that calls makeApiRequest and formats the response, with error handling.
    async function makeApiRequestWithErrorHandling(apiKey, endpoint, params = {}) {
      try {
        const data = await makeApiRequest(apiKey, endpoint, params)
        return formatResponse(data)
      } catch (error) {
        return formatErrorResponse(`Error fetching data from CoinMarketCap: ${error.message}`, 500)
      }
    }
  • Core API request function that builds the URL, appends query params, and fetches from CoinMarketCap with the API key.
    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()
    }
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 only states the return mapping but does not mention pagination, parameter effects, whether it's a list or dictionary, or any side effects. The description is too vague for a tool with 6 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence without fluff. However, it is under-specified for the tool's complexity, making it merely brief rather than efficiently informative.

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 6 parameters, no output schema, and no annotations, the description is far from complete. It does not explain how parameters modify the output or what the response format is. An agent would struggle to invoke this tool correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description should explain parameter meanings. It does not mention any of the six parameters (listing_status, start, limit, sort, symbol, aux) or how they affect results. The description adds no value for parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 cryptocurrencies to unique IDs, using a specific verb and resource. However, it could be more precise about what 'mapping' means (e.g., list vs. dictionary) and how it differs from sibling tools like allCryptocurrencyListings.

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?

No guidance on when to use this tool versus alternatives. No information on prerequisites, filtering, or when not to use it. The description lacks any contextual usage advice.

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