Skip to main content
Glama
anjor

Coinmarket

get_quotes

Fetch cryptocurrency quotes by providing a slug or symbol. Integrates with Coinmarket API to retrieve accurate pricing data for crypto assets.

Instructions

Get cryptocurrency quotes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNo
symbolNo

Implementation Reference

  • Main handler function that executes the get_quotes tool logic - makes API calls to CoinMarketCap to fetch cryptocurrency quotes
    async def get_quotes(slug: str | None, symbol: str | None) -> dict[str, Any]:
        url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest'
        parameters = {
          'convert':'USD'
        }
        if slug:
            parameters['slug'] = slug
        if symbol:
            parameters['symbol'] = symbol
        headers = {
          'Accepts': 'application/json',
          'X-CMC_PRO_API_KEY': API_KEY,
        }
    
        response = requests.get(url, headers=headers, params=parameters)
        response.raise_for_status()
        data = json.loads(response.text)
        return data
  • Tool registration schema defining get_quotes tool with slug and symbol parameters as optional strings
    types.Tool(
        name="get_quotes",
        description="Get cryptocurrency quotes",
        inputSchema={
            "type": "object",
            "properties": {
                "slug": {"type": "string"},
                "symbol": {"type": "string"},
            },
            "required": [],
        },
    ),
  • Tool execution handler that processes get_quotes calls and returns formatted results
    case "get_quotes":
        if not arguments:
            slug = None
            symbol = None
        else:
            slug = arguments.get("slug")
            symbol = arguments.get("symbol")
        try:
            data = await get_quotes(slug=slug, symbol=symbol)
            return [
                types.TextContent(
                    type="text",
                    text=json.dumps(data, indent=2),
                )
            ]
        except Exception as e:
            raise RuntimeError(f"Failed to fetch data: {e}")
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get cryptocurrency quotes' implies a read-only operation, but it doesn't specify critical traits like whether it requires authentication, rate limits, data freshness, error handling, or output format. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 extremely concise at three words, with zero wasted text. It's front-loaded with the core action and resource, making it easy to parse quickly. For such a simple tool, this brevity is appropriate and efficient.

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 the tool's complexity (2 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what 'quotes' entails, how parameters work, or what the output looks like. While conciseness is high, the lack of behavioral and parameter details makes it inadequate for an agent to use the tool effectively without guessing.

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?

The input schema has 2 parameters (slug, symbol) with 0% description coverage, meaning the schema provides no documentation on their meaning or usage. The description 'Get cryptocurrency quotes' adds no information about these parameters—it doesn't explain what 'slug' or 'symbol' represent, whether they're required, or how they affect the query. With 0% schema coverage, the description fails to compensate, leaving parameters entirely undocumented.

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

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get cryptocurrency quotes' clearly states the action (get) and resource (cryptocurrency quotes), which establishes the basic purpose. However, it doesn't specify what 'quotes' means (e.g., current prices, historical data, bid/ask spreads) or differentiate from the sibling tool 'get_currency_listings' (which might provide different data like market cap or volume). The purpose is understandable but vague in scope.

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?

The description provides no guidance on when to use this tool versus the sibling 'get_currency_listings' or other alternatives. It doesn't mention prerequisites, context (e.g., real-time vs. delayed data), or exclusions. Without any usage context, the agent must infer based on tool names alone, which is insufficient for reliable 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

Related 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/anjor/coinmarket-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server