Skip to main content
Glama
kukapay

crypto-trending-mcp

get_trending_md_doc

Retrieve trending cryptocurrency data from CoinGecko as a Markdown document for analysis, including price changes, volume, and market cap in a structured table format.

Instructions

Retrieve a Markdown document containing the CoinGecko trending cryptocurrencies page.

Returns:
    A string containing a Markdown-formatted document representing the full CoinGecko trending page.
    The document includes:
    - Page headers and introductory text.
    - A table of trending cryptocurrencies with columns such as Rank, Name, Symbol, Price,
      1h Change, 24h Change, 7d Change, 24h Volume, and Market Cap.
    - Additional page content like footers, navigation, or metadata.
    The trending coins table is embedded within the document and can be extracted for analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:39-53 (handler)
    The handler function for the 'get_trending_md_doc' tool, registered via @mcp.tool() decorator. It invokes the helper function scrape_trending_coins() to scrape the CoinGecko trending page and return it as Markdown.
    @mcp.tool()
    async def get_trending_md_doc() -> str:
        """
        Retrieve a Markdown document containing the CoinGecko trending cryptocurrencies page.
        
        Returns:
            A string containing a Markdown-formatted document representing the full CoinGecko trending page.
            The document includes:
            - Page headers and introductory text.
            - A table of trending cryptocurrencies with columns such as Rank, Name, Symbol, Price,
              1h Change, 24h Change, 7d Change, 24h Volume, and Market Cap.
            - Additional page content like footers, navigation, or metadata.
            The trending coins table is embedded within the document and can be extracted for analysis.
        """
        return await scrape_trending_coins()
  • main.py:9-36 (helper)
    Supporting utility function that performs web scraping using Playwright to fetch the trending cryptocurrencies from CoinGecko and converts the HTML to Markdown format using html2text.
    async def scrape_trending_coins() -> str:
        """Scrape the CoinGecko trending page and convert it to Markdown."""
        async with async_playwright() as p:
            browser = await p.chromium.launch(
              headless=True
            )
            context = await browser.new_context(
                user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
                permissions=['geolocation', 'notifications']
            )        
            page = await context.new_page()
            await page.goto("https://www.coingecko.com/en/highlights/trending-crypto")
            
            # Wait for the page to load key content
            await page.wait_for_selector("table", timeout=60000)
            
            # Get the full HTML content of the page
            html_content = await page.content()
            
            # Convert HTML to Markdown using html2text
            h = html2text.HTML2Text()
            h.ignore_links = True  # Skip links
            h.ignore_images = True  # Skip images
            h.body_width = 0  # Disable line wrapping
            markdown = h.handle(html_content)
            
            await browser.close()
            return markdown
Behavior3/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. It discloses that the tool retrieves and returns a Markdown-formatted document with specific content, which is useful. However, it lacks details on potential behavioral traits like rate limits, error handling, or data freshness, leaving gaps in transparency.

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 well-structured and front-loaded, starting with the core purpose and then detailing the return content in a bulleted list. Every sentence adds value without redundancy, making it efficient and easy to parse.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is largely complete. It explains the purpose, output format, and content details. However, it could improve by addressing potential limitations or usage context, such as data update frequency or extraction hints, to fully compensate for the lack of structured fields.

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 0 parameters with 100% coverage, so no parameter information is needed. The description appropriately focuses on the output and content, adding value beyond the schema by detailing what the returned document includes, which is relevant for understanding the tool's semantics.

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 specific action ('Retrieve') and resource ('Markdown document containing the CoinGecko trending cryptocurrencies page'), with no sibling tools to differentiate from. It precisely defines what the tool does without being vague or tautological.

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 by specifying the content retrieved (trending cryptocurrencies page), but there are no explicit guidelines on when to use this tool versus alternatives, nor any exclusions mentioned. With no sibling tools, this is adequate but lacks proactive guidance.

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/kukapay/crypto-trending-mcp'

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