Skip to main content
Glama
narumiruna

coindesk-mcp

recent_news

Stay updated on cryptocurrency and blockchain news by retrieving the latest articles from CoinDesk's RSS feed. Returns formatted entries with titles, links, timestamps, and summaries.

Instructions

Retrieves the latest cryptocurrency and blockchain news articles from CoinDesk's RSS feed.

Fetches the current RSS feed from CoinDesk, parses it to extract information about
recent articles, and returns a formatted list of news items including titles,
links, publication timestamps, and summary content.

Returns:
    str: A formatted string containing multiple news entries separated by '---',
         with each entry showing title, URL, publication time, and summary

Raises:
    HTTPStatusError: If the RSS feed request fails
    Exception: If RSS parsing encounters errors

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'recent_news' tool. It fetches the RSS feed for the specified site (coindesk or decrypt), parses it using feedparser, and returns a formatted string of recent news entries separated by ---.
    @mcp.tool()
    async def recent_news(site: Literal["coindesk", "decrypt"]) -> str:
        """
        Gets latest crypto news from specified site.
    
        Args:
            site: Site to fetch news from ("coindesk" or "decrypt")
    
        Returns:
            Formatted list of news entries with titles, links, dates and summaries
        """
        url = RSS_URLS.get(site)
        if url is None:
            raise ValueError(f"Unsupported site: {site}")
    
        text = await fetch_text_from_url(url)
        feed = feedparser.parse(text)
        return "\n---\n".join(
            f"{entry['title']}\n{entry['link']}\n{entry['updated']}\n{entry['summary']}" for entry in feed["entries"]
        )
  • The @mcp.tool() decorator registers the recent_news function as an MCP tool.
    @mcp.tool()
  • Constant dictionary mapping site names to their RSS feed URLs, used by the recent_news handler.
    RSS_URLS = {
        "coindesk": "https://www.coindesk.com/arc/outboundfeeds/rss",
        "decrypt": "https://decrypt.co/feed",
    }
  • Async utility function to fetch text content from a URL using httpx. Called by recent_news to retrieve the RSS feed data.
    async def fetch_text_from_url(url: str) -> str:
        """
        Asynchronously retrieves text content from a specified URL.
    
        Makes an HTTP GET request to the provided URL and returns the response
        content as text. Handles connection setup and cleanup automatically.
    
        Args:
            url (str): The URL to fetch content from
    
        Returns:
            str: The text content received from the URL
    
        Raises:
            HTTPStatusError: If the HTTP request returns a non-2xx status code
            RequestError: If a network-related error occurs during the request
        """
        async with httpx.AsyncClient() as client:
            response = await client.get(url)
            response.raise_for_status()
            return response.text
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: fetching and parsing an RSS feed, returning formatted news items, and raising specific errors (HTTPStatusError, Exception). This covers key operational aspects like data source, processing steps, and error handling, though it lacks details on rate limits or caching.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the core purpose in the first sentence. Subsequent sentences add necessary details about the process, return format, and error handling without redundancy. It could be slightly more concise by combining some sentences, but overall it is efficient and informative.

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 complexity (fetching and parsing external data) and lack of annotations or output schema, the description provides a complete picture: it explains what the tool does, how it works, the return format, and potential errors. This is sufficient for an agent to understand and use the tool effectively, though an output schema would further enhance completeness.

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 0 parameters with 100% schema description coverage, so no parameter information is needed. The description appropriately does not discuss parameters, focusing instead on the tool's functionality and output. This meets the baseline for tools with no 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 specific action ('retrieves'), resource ('latest cryptocurrency and blockchain news articles'), and source ('from CoinDesk's RSS feed'). It distinguishes from the sibling tool 'read_news' by specifying the RSS feed source and real-time nature ('latest'), whereas 'read_news' might imply reading stored or different news sources.

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?

The description implies usage context by specifying 'latest' news and the CoinDesk source, which helps differentiate from 'read_news'. However, it does not explicitly state when to use this tool versus 'read_news' or provide any exclusions or prerequisites for usage.

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/narumiruna/coindesk-mcp'

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