Skip to main content
Glama

get_rss_feed

Retrieve and format cryptocurrency RSS feed content into Markdown with titles, links, dates, and summaries for up to 10 latest entries.

Instructions

Retrieve the content of the specified RSS feed.

Parameters:
    feed_url (str): The URL of the RSS feed to fetch (e.g., 'https://cointelegraph.com/rss').
    ctx (Context, optional): MCP context for logging or progress reporting.

Returns:
    str: A formatted Markdown string containing the feed title and up to 10 latest entries with titles, links, publication dates, and summaries converted from HTML to plain text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feed_urlYes

Implementation Reference

  • The @mcp.tool()-decorated handler function implementing the get_rss_feed tool. Fetches RSS feed using helper, processes up to 10 entries, converts HTML summaries to plain text, and returns formatted Markdown output. Includes input/output schema in docstring and type annotations.
    @mcp.tool()
    async def get_rss_feed(feed_url: str, ctx: Context = None) -> str:
        """
        Retrieve the content of the specified RSS feed.
        
        Parameters:
            feed_url (str): The URL of the RSS feed to fetch (e.g., 'https://cointelegraph.com/rss').
            ctx (Context, optional): MCP context for logging or progress reporting.
        
        Returns:
            str: A formatted Markdown string containing the feed title and up to 10 latest entries with titles, links, publication dates, and summaries converted from HTML to plain text.
        """
        ctx.info(f"Fetching RSS feed from {feed_url}")
        feed = await fetch_rss_feed(feed_url)
        entries = feed.entries[:10]  # Limit to the latest 10 entries
        
        # Initialize html2text converter
        h = html2text.HTML2Text()
        h.body_width = 0  # Disable line wrapping
        h.ignore_links = True  # Ignore links in summary
        h.ignore_images = True  # Ignore images in summary
        h.inline_links = False  # Ensure links are not embedded in text
        h.mark_code = False  # Disable code block markers
        h.use_automatic_links = False  # Disable automatic link references
        h.skip_internal_headers = True  # Ignores <h1>-<h6> tags
        
        result = f"# Feed: {feed.feed.title}\n\n"
        for i, entry in enumerate(entries):
            # Convert HTML summary to plain text
            summary_text = h.handle(entry.summary).strip()
            # Post-process to demote ## headers to ### in summary
            summary_text = re.sub(r'^\s*##\s+(.+)$', r'### \1', summary_text, flags=re.MULTILINE)
            result += f"## Entry {i + 1}\n"
            result += f"- **Title**: {entry.title}\n"
            result += f"- **Link**: [{entry.link}]({entry.link})\n"
            result += f"- **Published**: {entry.published}\n"
            result += f"- **Summary**: {summary_text}\n\n"
        return result
  • Supporting helper function that asynchronously fetches the RSS feed content via httpx and parses it using feedparser, used by the main get_rss_feed handler.
    async def fetch_rss_feed(url: str) -> feedparser.FeedParserDict:
        """Fetch and parse an RSS feed from the specified URL."""
        async with httpx.AsyncClient() as client:
            response = await client.get(url)
            response.raise_for_status()
            return feedparser.parse(response.text)
  • The @mcp.tool() decorator registers the get_rss_feed function as an MCP tool under that name.
    @mcp.tool()
Behavior3/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 does reveal that the tool returns up to 10 latest entries with specific formatting (Markdown, HTML-to-plain-text conversion), which is valuable behavioral information. However, it doesn't mention error handling, rate limits, authentication requirements, or network timeout behavior.

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 perfectly structured and concise. It begins with a clear purpose statement, then provides organized sections for Parameters and Returns with specific, useful details. Every sentence earns its place with no wasted words.

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?

For a single-parameter tool with no annotations and no output schema, the description provides substantial context about what the tool does and what it returns. The detailed return format description compensates well for the lack of output schema. The main gap is the lack of sibling tool differentiation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides excellent parameter semantics beyond the bare schema. While the schema only shows 'feed_url' as a string parameter, the description explains it's 'The URL of the RSS feed to fetch' and provides a concrete example ('https://cointelegraph.com/rss'). This adds significant value given the 0% schema description coverage.

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

Purpose4/5

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

The description clearly states the verb ('Retrieve') and resource ('content of the specified RSS feed'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from its sibling tool 'get_crypto_rss_list', which appears to be a list operation rather than a content retrieval operation.

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 alternatives. There's no mention of the sibling tool 'get_crypto_rss_list' or any other context about when this specific feed retrieval is appropriate versus other RSS-related operations.

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-rss-mcp'

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