fetchRss
Retrieve all blog posts from RSS feeds to monitor content updates and access complete article archives for research or content aggregation.
Instructions
Fetch ALL blog posts from any RSS feed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | RSS feed URL |
Implementation Reference
- src/server.ts:87-97 (handler)Core handler function that parses the given RSS URL using rss-parser and maps items to ContentItem objects with type 'blog'.async function fetchRss(url: string): Promise<ContentItem[]> { const feed = await rssParser.parseURL(url); return feed.items.map((item) => ({ id: item.guid || item.link || "", title: item.title || "", url: item.link || "", published_at: item.pubDate || "", type: "blog" as const, })); }
- src/server.ts:141-148 (registration)Registers the 'fetchRss' tool with FastMCP server, specifying name, description, input parameters schema, and execute handler that calls the fetchRss function.server.addTool({ name: "fetchRss", description: "Fetch ALL blog posts from any RSS feed.", parameters: z.object({ url: z.string().describe("RSS feed URL"), }), execute: async ({ url }) => JSON.stringify(await fetchRss(url)), });
- src/server.ts:144-146 (schema)Zod input schema defining the required 'url' parameter as a string for the RSS feed URL.parameters: z.object({ url: z.string().describe("RSS feed URL"), }),
- src/server.ts:30-36 (schema)TypeScript interface defining the structure of ContentItem returned by fetchRss (with type 'blog').interface ContentItem { id: string; title: string; url: string; published_at: string; type: "video" | "blog" | "release"; }