Home/Tools/@tpmjs/tools-rss-read

rssReadTool

@tpmjs/tools-rss-read

Parse RSS or Atom feeds from a URL and extract feed metadata (title, link, description) and feed items (title, link, description, pubDate, author). Useful for reading blog feeds, news feeds, podcasts, and other syndicated content.

Official
web
v0.2.0
MIT

Interactive Playground

Test @tpmjs/tools-rss-read (rssReadTool) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-rss-read
pnpm add @tpmjs/tools-rss-read
yarn add @tpmjs/tools-rss-read
bun add @tpmjs/tools-rss-read
deno add npm:@tpmjs/tools-rss-read

2. Import the tool

import { rssReadTool } from '@tpmjs/tools-rss-read';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { rssReadTool } from '@tpmjs/tools-rss-read';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { rssReadTool },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Parameters

Available configuration options

Auto-extracted
url
Required
Type: string

The RSS or Atom feed URL to parse (must be http or https)

limit
Optional
Type: number

Maximum number of items to return (default: 20, max: 100)

Schema extracted: 1/1/2026, 8:17:45 AM

README

@tpmjs/tools-rss-read

Parse RSS/Atom feeds and extract feed metadata and items.

Installation

npm install @tpmjs/tools-rss-read

Usage

import { rssReadTool } from '@tpmjs/tools-rss-read';
import { generateText } from 'ai';

const result = await generateText({
  model: yourModel,
  tools: { rssReadTool },
  prompt: 'Get the latest articles from https://example.com/feed.xml',
});

Tool Parameters

  • url (string, required): The RSS or Atom feed URL to parse
  • limit (number, optional): Maximum number of items to return (default: 20, max: 100)

Returns

{
  feed: {
    title: string;
    link: string;
    description?: string;
    language?: string;
    lastBuildDate?: string;
    imageUrl?: string;
  };
  items: Array<{
    title: string;
    link: string;
    description?: string;
    pubDate?: string;
    author?: string;
    categories?: string[];
    guid?: string;
  }>;
  itemCount: number;
  metadata: {
    fetchedAt: string;
    feedType: string;
    totalItems: number;
    limitApplied: boolean;
  };
}

Features

  • Supports both RSS 2.0 and Atom feeds
  • Extracts feed metadata (title, description, image)
  • Extracts item details (title, link, description, date, author, categories)
  • Configurable item limit
  • Comprehensive error handling
  • Sanitizes HTML content to plain text
  • 30-second timeout protection

Requirements

  • Node.js 18+ (uses native fetch API)

License

MIT

Statistics

Downloads/month

42

Quality Score

78%

Bundle Size

NPM Keywords

tpmjs
rss
atom
feed
parser
web

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai