Skip to main content
Glama

fearAndGreedLatest

Retrieves the current Crypto Fear and Greed Index value to assess market sentiment.

Instructions

Returns the latest CMC Crypto Fear and Greed Index value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:532-541 (registration)
    Registration of the 'fearAndGreedLatest' tool via server.tool(). No input schema (empty object). The callback is the handler.
    server.tool("fearAndGreedLatest",
      "Returns the latest CMC Crypto Fear and Greed Index value.",
      {},
      async () => {
        return handleEndpoint(async () => {
          const data = await makeApiRequest(apiKey, '/v3/fear-and-greed/latest')
          return formatResponse(data)
        })
      }
    )
  • Handler callback for the fearAndGreedLatest tool. Makes an API call to /v3/fear-and-greed/latest and formats the response.
    async () => {
      return handleEndpoint(async () => {
        const data = await makeApiRequest(apiKey, '/v3/fear-and-greed/latest')
        return formatResponse(data)
      })
    }
  • Helper function that wraps API response data in the MCP content format.
    function formatResponse(data) {
      return {
        content: [{
          type: "text",
          text: JSON.stringify(data)
        }]
      }
    }
  • Helper wrapper that catches errors from endpoint handlers and returns formatted error responses.
    async function handleEndpoint(apiCall) {
      try {
        return await apiCall()
      } catch (error) {
        return formatErrorResponse(error.message, error.status || 403)
      }
    }
  • Helper function that makes the HTTP GET request to the CoinMarketCap Pro API with the provided 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?

No annotations are provided, and the description fails to disclose any behavioral traits such as error handling, rate limits, or what happens when data is unavailable. It only states the output type, which is minimal.

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, well-formed sentence that conveys all necessary information. It is front-loaded and contains no extraneous words.

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

Completeness3/5

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

The tool is simple with no parameters and no output schema. The description is minimally adequate but lacks details about the return format (e.g., numerical score, classification). It covers the essential purpose but not enough for complete understanding.

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 input schema has zero parameters, so the description does not need to explain parameters. The baseline for no parameters is 4, and the description adds no further value for parameters.

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 verb 'Returns' and the resource 'latest CMC Crypto Fear and Greed Index value'. It is specific and distinguishes from the sibling tool 'fearAndGreedHistorical'.

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 (e.g., 'fearAndGreedHistorical'). The description does not mention when not to use it or provide any context for selection.

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