Skip to main content
Glama

cmc100IndexHistorical

Retrieve historical CoinMarketCap 100 Index values by specifying interval, start/end times, and number of data points.

Instructions

Returns an interval of historic CoinMarketCap 100 Index values based on the interval parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
time_startNo
time_endNo
countNo
intervalNo

Implementation Reference

  • The async handler function for the cmc100IndexHistorical tool that makes an API request to /v3/index/cmc100-historical and formats the response.
    async (params) => {
      return handleEndpoint(async () => {
        const data = await makeApiRequest(apiKey, '/v3/index/cmc100-historical', params)
        return formatResponse(data)
      })
    }
  • Zod schema defining the optional input parameters: time_start, time_end, count (all strings), and interval (enum of '5m', '15m', 'daily').
    {
      time_start: z.string().optional(),
      time_end: z.string().optional(),
      count: z.string().optional(),
      interval: z.enum(['5m', '15m', 'daily']).optional()
    },
  • index.js:503-517 (registration)
    Registration of the cmc100IndexHistorical tool via server.tool() with its description, schema, and handler function.
    server.tool("cmc100IndexHistorical",
      "Returns an interval of historic CoinMarketCap 100 Index values based on the interval parameter.",
      {
        time_start: z.string().optional(),
        time_end: z.string().optional(),
        count: z.string().optional(),
        interval: z.enum(['5m', '15m', 'daily']).optional()
      },
      async (params) => {
        return handleEndpoint(async () => {
          const data = await makeApiRequest(apiKey, '/v3/index/cmc100-historical', params)
          return formatResponse(data)
        })
      }
    )
  • The handleEndpoint wrapper function used by the tool handler to catch and format errors.
    async function handleEndpoint(apiCall) {
      try {
        return await apiCall()
      } catch (error) {
        return formatErrorResponse(error.message, error.status || 403)
      }
    }
  • The makeApiRequest helper function that builds the URL, makes the fetch call with the API key, and returns JSON data.
    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 carries the full burden. It does not disclose any behavioral traits such as rate limits, data availability, default interval, or error handling. The only behavioral hint is that it returns 'historic' values.

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 sentence with no unnecessary words, making it concise. However, it could benefit from a slightly more structured format to highlight key points.

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 four parameters and no output schema, the description is incomplete. It does not explain the return format, parameter requirements, or provide examples, leaving significant gaps for the agent.

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%, yet the description only mentions the interval parameter without explaining its values (5m, 15m, daily) or the purpose of time_start, time_end, and count. It adds little value beyond the raw schema.

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 that the tool returns historic CoinMarketCap 100 Index values, using a specific verb and resource. It is effectively distinguished from the sibling 'cmc100IndexLatest' which returns the latest index value.

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 is provided on when to use this tool versus alternatives. There is no mention of prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name and description alone.

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