Skip to main content
Glama
ymylive
by ymylive

get_trending

Identify trending coins, NFTs, and categories on CoinGecko based on search volume from the last 24 hours. Use this tool to surface narratives and emergent market interest before price movements.

Instructions

Get currently trending coins, NFT collections and categories on CoinGecko (last 24h searches).

Use to answer "what is the market paying attention to right now?" or to surface narratives. This is search-driven, not volume-driven, so it captures emergent interest before price moves.

Returns: Object with arrays coins, nfts, and categories. Each coin item includes item.id, item.name, item.symbol, item.market_cap_rank, and item.data with price/24h-change snapshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual tool handler: decorated with @mcp.tool(), fetches trending coins/NFTs/categories from CoinGecko's /search/trending endpoint.
    @mcp.tool()
    async def get_trending() -> Any:
        """Get currently trending coins, NFT collections and categories on CoinGecko (last 24h searches).
    
        Use to answer "what is the market paying attention to right now?" or to
        surface narratives. This is search-driven, not volume-driven, so it
        captures emergent interest before price moves.
    
        Returns:
            Object with arrays `coins`, `nfts`, and `categories`. Each coin item
            includes `item.id`, `item.name`, `item.symbol`, `item.market_cap_rank`,
            and `item.data` with price/24h-change snapshot.
        """
        return await _cg_get("/search/trending")
  • Imports for the handler: _cg_get (HTTP helper) and mcp (FastMCP instance) from core.
    """CoinGecko tools — aggregated market data, exchanges directory, NFTs, categories, treasuries."""
    from __future__ import annotations
    
    import re
    from typing import Any, Literal
    
    from .core import _bool_str, _cg_get, mcp
  • Registration via @mcp.tool() decorator on the get_trending function.
    @mcp.tool()
    async def get_trending() -> Any:
  • The _cg_get helper constructs the CoinGecko base URL + path and delegates to _http_get.
    async def _cg_get(path: str, params: dict[str, Any] | None = None) -> Any:
        return await _http_get(
            f"{_coingecko_base()}{path}",
            params=params,
            headers=_coingecko_headers(),
        )
  • The _http_get helper that performs the actual HTTP GET via TTL cache.
    async def _http_get(
        url: str,
        params: dict[str, Any] | None = None,
        headers: dict[str, str] | None = None,
    ) -> Any:
        """GET a URL and return JSON, or a structured error dict on failure.
    
        Delegates to the in-process TTL cache so repeated identical requests
        don't re-hit the network. See `coin_mcp.cache` for routing rules.
        """
        from . import cache  # local import to avoid circular dependency at module load
        return await cache.cached_http_get(url, params=params, headers=headers)
Behavior3/5

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

Discloses that data is search-driven and returns a specific structure with price snapshots. No annotations exist, so description carries full burden. It does not mention potential limits like the number of items returned or any rate-limiting behavior, which would be helpful.

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?

Concise and well-structured: first sentence states purpose, second provides usage context, then a clear 'Returns' section with specific fields. No unnecessary words; every sentence 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 no parameters and no output schema, the description fully explains what the tool returns and the context for use. It includes enough detail for an agent to understand the output and decide when to invoke it.

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?

With 0 parameters, the schema provides no information. The description adds meaning by detailing the return structure (coins, nfts, categories) and fields like item.id, item.name, etc. This exceeds the baseline of 3 for high schema coverage and effectively compensates for the lack of params.

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 tool gets trending coins, NFT collections, and categories based on last 24h searches. It distinguishes itself from siblings like get_top_gainers_losers by emphasizing search-driven vs volume-driven, and specifies the exact data returned.

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

Usage Guidelines4/5

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

Explicitly gives example questions ('what is the market paying attention to right now?') and explains the search-driven nature, helping the agent decide when to use it. However, it does not explicitly mention when not to use it or point to alternative tools for volume-driven queries.

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/ymylive/coin-mcp'

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