get_feeds
Retrieve RSS feed subscriptions from Tiny Tiny RSS with filtering by category, unread status, and pagination options.
Instructions
获取 tt-rss 的订阅源列表。可按分类过滤,支持分页。特殊分类 ID: -1=特殊, -2=标签, -3=所有(不含虚拟), -4=所有(含虚拟), 0=未分类
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cat_id | No | 分类 ID,不传则返回全部 | |
| unread_only | No | 仅返回有未读文章的源 | |
| limit | No | 返回数量限制 | |
| offset | No | 跳过前 N 条 | |
| include_nested | No | 包含子分类中的源 |
Implementation Reference
- src/tools/feeds.ts:38-70 (handler)The handler logic for the 'get_feeds' tool, which takes parameters defined in the schema and calls 'client.getFeeds(params)'.
server.tool( "get_feeds", "获取 tt-rss 的订阅源列表。可按分类过滤,支持分页。特殊分类 ID: -1=特殊, -2=标签, -3=所有(不含虚拟), -4=所有(含虚拟), 0=未分类", { cat_id: z .number() .optional() .describe("分类 ID,不传则返回全部"), unread_only: z .boolean() .default(false) .describe("仅返回有未读文章的源"), limit: z.number().optional().describe("返回数量限制"), offset: z.number().optional().describe("跳过前 N 条"), include_nested: z .boolean() .default(false) .describe("包含子分类中的源"), }, async (params) => { try { const feeds = await client.getFeeds(params); return { content: [{ type: "text" as const, text: JSON.stringify(feeds, null, 2) }], }; } catch (e: unknown) { return { content: [{ type: "text" as const, text: `获取订阅源失败: ${(e as Error).message}` }], isError: true, }; } }, ); - src/tools/feeds.ts:41-56 (schema)Input validation schema for 'get_feeds' tool parameters using Zod.
{ cat_id: z .number() .optional() .describe("分类 ID,不传则返回全部"), unread_only: z .boolean() .default(false) .describe("仅返回有未读文章的源"), limit: z.number().optional().describe("返回数量限制"), offset: z.number().optional().describe("跳过前 N 条"), include_nested: z .boolean() .default(false) .describe("包含子分类中的源"), }, - src/tools/feeds.ts:38-38 (registration)Registration of the 'get_feeds' tool within the MCP server setup.
server.tool(