Skip to main content
Glama
MissionSquad

@missionsquad/mcp-rss

Official

fetch_rss_feed

Fetch and parse RSS feeds to extract structured data, including feed information and items. Input the URL and optionally use description as content for streamlined feed management.

Instructions

Fetches and parses an RSS feed, returning structured data with feed info and items

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the RSS feed to fetch
useDescriptionAsContentNoIf 'true', use description field as content instead of content field

Implementation Reference

  • Execute handler for fetch_rss_feed tool: handles caching, calls rssReader.fetchFeed, and returns structured JSON.
    execute: async (args, context) => {
      try {
        logger.info(`Fetching RSS feed: ${args.url}`);
    
        // Check cache first
        const cached = feedCache.get(args.url);
        if (cached) {
          logger.debug(`Returning cached feed: ${args.url}`);
          return JSON.stringify(cached, null, 2);
        }
    
        // Get cache metadata for conditional requests
        const cacheMeta = feedCache.getMetadata(args.url);
    
        // Fetch feed
        const result = await rssReader.fetchFeed(args.url, {
          useDescriptionAsContent: args.useDescriptionAsContent === 'true',
          etag: cacheMeta?.etag,
          lastModified: cacheMeta?.lastModified,
        });
    
        // Cache the result
        feedCache.set(args.url, result);
    
        logger.info(
          `Successfully fetched feed: ${args.url}, ${result.items.length} items`
        );
        return JSON.stringify(result, null, 2);
      } catch (error: any) {
        if (error.message === "NOT_MODIFIED" && feedCache.has(args.url)) {
          // Return cached version if not modified
          const cached = feedCache.get(args.url);
          if (cached) {
            logger.debug(`Feed not modified, returning cache: ${args.url}`);
            return JSON.stringify(cached, null, 2);
          }
        }
    
        logger.error(`Failed to fetch RSS feed ${args.url}: ${error.message}`);
        throw new UserError(`Failed to fetch RSS feed: ${error.message}`);
      }
    },
  • Zod schema defining input parameters for fetch_rss_feed tool.
    const FetchRssFeedSchema = z.object({
      url: z.string().describe("The URL of the RSS feed to fetch"),
      useDescriptionAsContent: z
        .string()
        .optional()
        .describe(
          "If 'true', use description field as content instead of content field"
        ),
    });
  • src/index.ts:27-74 (registration)
    Registration of the fetch_rss_feed tool with FastMCP server, including name, description, schema, and execute handler.
    server.addTool({
      name: "fetch_rss_feed",
      description:
        "Fetches and parses an RSS feed, returning structured data with feed info and items",
      parameters: FetchRssFeedSchema,
      execute: async (args, context) => {
        try {
          logger.info(`Fetching RSS feed: ${args.url}`);
    
          // Check cache first
          const cached = feedCache.get(args.url);
          if (cached) {
            logger.debug(`Returning cached feed: ${args.url}`);
            return JSON.stringify(cached, null, 2);
          }
    
          // Get cache metadata for conditional requests
          const cacheMeta = feedCache.getMetadata(args.url);
    
          // Fetch feed
          const result = await rssReader.fetchFeed(args.url, {
            useDescriptionAsContent: args.useDescriptionAsContent === 'true',
            etag: cacheMeta?.etag,
            lastModified: cacheMeta?.lastModified,
          });
    
          // Cache the result
          feedCache.set(args.url, result);
    
          logger.info(
            `Successfully fetched feed: ${args.url}, ${result.items.length} items`
          );
          return JSON.stringify(result, null, 2);
        } catch (error: any) {
          if (error.message === "NOT_MODIFIED" && feedCache.has(args.url)) {
            // Return cached version if not modified
            const cached = feedCache.get(args.url);
            if (cached) {
              logger.debug(`Feed not modified, returning cache: ${args.url}`);
              return JSON.stringify(cached, null, 2);
            }
          }
    
          logger.error(`Failed to fetch RSS feed ${args.url}: ${error.message}`);
          throw new UserError(`Failed to fetch RSS feed: ${error.message}`);
        }
      },
    });
  • Core RSS feed fetching logic in RSSReader class: fetches raw XML, parses it, formats into structured FeedResult.
    async fetchFeed(
      url: string,
      options?: {
        useDescriptionAsContent?: boolean;
        etag?: string;
        lastModified?: string;
      }
    ): Promise<FeedResult> {
      // Fetch raw feed
      const { data, etag, lastModified, notModified } = await this.fetchRawFeed(
        url,
        options?.etag,
        options?.lastModified
      );
      
      if (notModified) {
        throw new Error('NOT_MODIFIED');
      }
      
      // Parse feed
      const parsed = await this.parseFeed(data);
      if (!parsed) {
        throw new Error('Failed to parse feed XML');
      }
      
      // Format feed
      const result = this.formatFeed(parsed, url, options?.useDescriptionAsContent);
      
      // Add cache headers if available
      if (etag) result.etag = etag;
      if (lastModified) result.lastModified = lastModified;
      
      return result;
    }
  • TypeScript interface matching the input parameters for fetch_rss_feed.
    export interface FetchRssFeedParams {
      url: string;
      useDescriptionAsContent?: 'true' | 'false';
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks critical behavioral details. It doesn't disclose error handling (e.g., invalid URLs), rate limits, authentication needs, or what 'structured data' entails (format, fields). The mention of parsing hints at transformation but doesn't clarify output 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 a single, efficient sentence with zero waste—it directly states the action, resource, and outcome. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given no annotations and no output schema, the description is incomplete for a tool that fetches and parses external data. It lacks details on error handling, output structure, and behavioral constraints. However, it does cover the core purpose adequately, making it minimally viable but with clear gaps.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters fully. The description adds no parameter-specific semantics beyond what's in the schema, such as URL format examples or use-case details for 'useDescriptionAsContent'. Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('fetches and parses') and resource ('RSS feed'), and distinguishes from siblings by specifying it returns structured data with feed info and items. This differentiates it from tools like 'get_feed_headlines' (likely just headlines) or 'extract_feed_content' (likely content-focused).

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 like 'fetch_multiple_feeds' or 'search_feed_items'. It doesn't mention prerequisites, exclusions, or comparative contexts, leaving the agent to guess based on tool names alone.

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

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