get rss feed
Retrieve RSS feeds from TabNews to access content updates and notifications directly within AI tools.
Instructions
To get the rss feed from tabnews
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/status.ts:281-305 (handler)The MCP tool definition including the handler function for "get rss feed", which fetches the RSS feed using the service and returns it formatted as MCP text content.export const getRssFeedTool = { name: "get rss feed", description: "To get the rss feed from tabnews", parameters: {}, handler: async (): Promise<McpResponse> => { try { const result = await getRssFeed(); const content: McpTextContent = { type: "text", text: `RSS Feed:\n\n${result}`, }; return { content: [content], }; } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get rss feed: ${error.message}`); } else { throw new Error("Failed to get rss feed"); } } }, };
- src/index.ts:80-85 (registration)Registration of the "get rss feed" tool in the MCP server by calling server.tool with its name, description, parameters, and handler.server.tool( getRssFeedTool.name, getRssFeedTool.description, getRssFeedTool.parameters, getRssFeedTool.handler );
- src/services/api.ts:114-119 (helper)Supporting utility function that fetches the raw RSS feed content from the TabNews API endpoint.export async function getRssFeed(): Promise<string> { const response = await fetch(`${TABNEWS_API_URL}/contents/rss`); const data = await response.text(); return data; }