Skip to main content
Glama

get_headlines

Retrieve article headlines from Tiny Tiny RSS feeds with filtering options for unread, starred, or specific categories to organize your reading workflow.

Instructions

获取文章标题列表。特殊 feed_id: -4=全部, -3=最新, -2=已发布, -1=星标, 0=已归档。可按 view_mode 过滤未读/星标等。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feed_idNo源 ID。-4=全部, -3=最新, -2=已发布, -1=星标, 0=已归档, 正数=具体源
limitNo返回数量限制 (最大 200)
skipNo跳过前 N 篇
view_modeNo过滤模式unread
is_catNofeed_id 是否为分类 ID
show_excerptNo返回文章摘要
show_contentNo返回文章全文 (较大)
include_attachmentsNo包含附件信息
order_byNo排序方式: 空=默认, feed_dates=最新优先, date_reverse=最旧优先
since_idNo只返回 ID 大于此值的文章

Implementation Reference

  • Registration and implementation handler for the "get_headlines" tool. It calls the client's getHeadlines method and returns a simplified version of the results.
    server.tool(
      "get_headlines",
      "获取文章标题列表。特殊 feed_id: -4=全部, -3=最新, -2=已发布, -1=星标, 0=已归档。可按 view_mode 过滤未读/星标等。",
      {
        feed_id: z
          .number()
          .default(-4)
          .describe("源 ID。-4=全部, -3=最新, -2=已发布, -1=星标, 0=已归档, 正数=具体源"),
        limit: z.number().default(20).describe("返回数量限制 (最大 200)"),
        skip: z.number().default(0).describe("跳过前 N 篇"),
        view_mode: z
          .enum(["all_articles", "unread", "adaptive", "marked", "updated"])
          .default("unread")
          .describe("过滤模式"),
        is_cat: z.boolean().default(false).describe("feed_id 是否为分类 ID"),
        show_excerpt: z.boolean().default(true).describe("返回文章摘要"),
        show_content: z.boolean().default(false).describe("返回文章全文 (较大)"),
        include_attachments: z.boolean().default(false).describe("包含附件信息"),
        order_by: z
          .enum(["", "feed_dates", "date_reverse"])
          .default("")
          .describe("排序方式: 空=默认, feed_dates=最新优先, date_reverse=最旧优先"),
        since_id: z.number().optional().describe("只返回 ID 大于此值的文章"),
      },
      async (params) => {
        try {
          const headlines = await client.getHeadlines(params);
          const simplified = headlines.map((h) => ({
            id: h.id,
            title: h.title,
            feed_title: h.feed_title,
            link: h.link,
            unread: h.unread,
            marked: h.marked,
            updated: new Date(h.updated * 1000).toISOString(),
            author: h.author,
            excerpt: h.excerpt,
            ...(params.show_content ? { content: h.content } : {}),
            labels: h.labels,
            note: h.note,
          }));
          return ok(JSON.stringify(simplified, null, 2));
        } catch (e: unknown) {
          return fail(`获取文章列表失败: ${(e as Error).message}`);
        }
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aooiuu/ttrss-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server