Skip to main content
Glama

cryptoCategories

Retrieves details of cryptocurrency categories listed on CoinMarketCap, filterable by ID, slug, or symbol.

Instructions

Returns information about all coin categories available on CoinMarketCap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startNo
limitNo
idNo
slugNo
symbolNo

Implementation Reference

  • index.js:122-137 (registration)
    Registration of the 'cryptoCategories' tool via server.tool() with schema definition and async handler.
    server.tool("cryptoCategories",
      "Returns information about all coin categories available on CoinMarketCap.",
      {
        start: z.number().optional(),
        limit: z.number().optional(),
        id: z.string().optional(),
        slug: z.string().optional(),
        symbol: z.string().optional()
      },
      async (params) => {
        return handleEndpoint(async () => {
          const data = await makeApiRequest(apiKey, '/v1/cryptocurrency/categories', params)
          return formatResponse(data)
        })
      }
    )
  • Input schema for cryptoCategories tool using Zod: optional start (number), limit (number), id (string), slug (string), symbol (string).
    {
      start: z.number().optional(),
      limit: z.number().optional(),
      id: z.string().optional(),
      slug: z.string().optional(),
      symbol: z.string().optional()
    },
  • Handler function that calls the CoinMarketCap API endpoint /v1/cryptocurrency/categories with the provided parameters and formats the response.
    async (params) => {
      return handleEndpoint(async () => {
        const data = await makeApiRequest(apiKey, '/v1/cryptocurrency/categories', params)
        return formatResponse(data)
      })
    }
  • makeApiRequestWithErrorHandling - helper used as wrapper for API calls with error formatting.
    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)
      }
    }
  • makeApiRequest - core helper that constructs the URL, calls the CoinMarketCap API with the API key, and returns the JSON response.
    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?

No annotations provided, so description carries full burden. It only says 'returns information' without disclosing pagination, rate limits, or side effects. Minimal behavioral context.

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

Conciseness3/5

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

Short and to the point, but lacks essential detail. Efficient in word count but not informative enough.

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

Completeness1/5

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

With 5 parameters and no output schema or annotations, description is grossly incomplete. Does not address filtering, pagination, or return structure.

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?

Schema description coverage is 0%, and description does not explain any parameters (start, limit, id, slug, symbol). No added meaning beyond the schema.

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?

Description clearly states the tool returns information about all coin categories, indicating a list operation. However, it does not mention the ability to filter by id/slug/symbol.

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 siblings like 'cryptoCategory' (singular) or others. No context on prerequisites or alternatives.

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