Skip to main content
Glama

cmc100IndexLatest

Obtain the current CoinMarketCap 100 Index value, constituents, and their weights.

Instructions

Returns the lastest CoinMarketCap 100 Index value, constituents, and constituent weights.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:519-529 (registration)
    The tool 'cmc100IndexLatest' is registered via server.tool() with the description 'Returns the lastest CoinMarketCap 100 Index value, constituents, and constituent weights.' and an empty schema object (no parameters).
    // /index/quotes/latest
    server.tool("cmc100IndexLatest",
      "Returns the lastest CoinMarketCap 100 Index value, constituents, and constituent weights.",
      {},
      async () => {
        return handleEndpoint(async () => {
          const data = await makeApiRequest(apiKey, '/v3/index/cmc100-latest')
          return formatResponse(data)
        })
      }
    )
  • The handler function calls handleEndpoint which wraps an API request to '/v3/index/cmc100-latest' via makeApiRequest, then formats the response with formatResponse.
    async () => {
      return handleEndpoint(async () => {
        const data = await makeApiRequest(apiKey, '/v3/index/cmc100-latest')
        return formatResponse(data)
      })
    }
  • handleEndpoint is a wrapper that executes the provided async API call and returns the result, catching errors and returning a formatted error response.
    async function handleEndpoint(apiCall) {
      try {
        return await apiCall()
      } catch (error) {
        return formatErrorResponse(error.message, error.status || 403)
      }
    }
  • makeApiRequest is the helper that sends GET requests to the CoinMarketCap API using the provided endpoint and parameters, using the API key for authentication.
    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()
    }
  • formatResponse wraps the API data into the standard MCP text content format.
    function formatResponse(data) {
      return {
        content: [{
          type: "text",
          text: JSON.stringify(data)
        }]
      }
    }
Behavior4/5

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

No annotations provided, so the description accurately informs that the tool returns three components of the index. It lacks details on data freshness or any side effects, but for a read-only tool with no parameters, this is sufficient.

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, front-loaded sentence with no wasted words. Every word adds value.

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

Completeness5/5

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

Given the tool's simplicity (zero parameters, no output schema), the description fully covers what the tool returns. No additional context is necessary.

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

Parameters4/5

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

The tool has zero parameters, and schema coverage is inherently 100%. The description adds no parameter info, but following the baseline rule for zero parameters, a score of 4 is appropriate.

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 uses a clear verb 'Returns' and specifies the exact resource: 'CoinMarketCap 100 Index value, constituents, and constituent weights.' It effectively distinguishes from sibling tool cmc100IndexHistorical which implies historical data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for obtaining the latest index data but does not explicitly state when to use it versus alternatives, nor does it mention any prerequisites or exclusions.

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