fetchRss
Retrieve all blog posts from any RSS feed URL to monitor content updates and track new publications.
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)The core handler function for the fetchRss tool: fetches and parses the RSS feed from the given URL and maps each item to a ContentItem object.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:144-146 (schema)Input schema definition using Zod for the fetchRss tool, specifying the required 'url' parameter.parameters: z.object({ url: z.string().describe("RSS feed URL"), }),
- src/server.ts:141-148 (registration)Registration of the fetchRss tool on the FastMCP server instance, including name, description, input schema, and execution wrapper that calls the handler and stringifies the result.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)), });