list_articles
Retrieve RSS articles from FreshRSS with filters for read status, feeds, categories, labels, and sorting options.
Instructions
List articles from FreshRSS with optional filtering
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of articles to return (1-100) | |
| filter | No | Filter by read status | |
| starred | No | Only return starred articles | |
| state | No | Predefined stream/state to list. Overrides other selectors if set. | |
| streamId | No | Full greader stream ID (e.g., feed/123, user/-/label/FolderName, user/-/state/com.google/reading-list). Overrides all other selectors. | |
| feedId | No | Filter by feed ID | |
| category | No | Filter by category/folder name | |
| label | No | Filter by label name | |
| order | No | Sort order | |
| continuation | No | Continuation token for pagination |
Implementation Reference
- src/handlers/article-handlers.ts:24-33 (handler)The handler function for 'list_articles' that calls the API client and formats the results.
wrapTool('list_articles', async (args: z.infer<typeof listArticlesSchema>) => { const result = await client.articles.list(args); const formatted = formatArticleList(result.articles); const continuation = result.continuation !== undefined ? `\n\nMore articles available. Use continuation: ${result.continuation}` : ''; return textResult(formatted + continuation); }) - src/handlers/article-handlers.ts:18-34 (registration)Registration of the 'list_articles' tool in the MCP server.
server.registerTool( 'list_articles', { description: 'List articles from FreshRSS with optional filtering', inputSchema: listArticlesSchema, }, wrapTool('list_articles', async (args: z.infer<typeof listArticlesSchema>) => { const result = await client.articles.list(args); const formatted = formatArticleList(result.articles); const continuation = result.continuation !== undefined ? `\n\nMore articles available. Use continuation: ${result.continuation}` : ''; return textResult(formatted + continuation); }) ); - src/tools/article-tools.ts:6-27 (schema)Zod schema definition for 'list_articles' input validation.
export const listArticlesSchema = z .object({ count: z.number().min(1).max(100).optional().describe('Number of articles to return (1-100)'), filter: z.enum(['all', 'read', 'unread']).optional().describe('Filter by read status'), starred: z.boolean().optional().describe('Only return starred articles'), state: z .enum(['reading-list', 'starred', 'read', 'unread']) .optional() .describe('Predefined stream/state to list. Overrides other selectors if set.'), streamId: z .string() .optional() .describe( 'Full greader stream ID (e.g., feed/123, user/-/label/FolderName, user/-/state/com.google/reading-list). Overrides all other selectors.' ), feedId: z.string().optional().describe('Filter by feed ID'), category: z.string().optional().describe('Filter by category/folder name'), label: z.string().optional().describe('Filter by label name'), order: z.enum(['newest', 'oldest']).optional().describe('Sort order'), continuation: z.string().optional().describe('Continuation token for pagination'), }) .strict();