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}`);
        }
      },
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions some filtering capabilities (feed_id special values, view_mode) but doesn't describe important behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, pagination behavior beyond skip/limit, or what happens with invalid parameters. The description adds some context but leaves significant gaps for a tool with 10 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two sentences that directly address the tool's functionality. The first sentence states the core purpose, and the second provides key parameter context. There's no wasted verbiage, though it could be slightly better structured with clearer separation of concepts.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 10 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain the return format, error conditions, or how parameters interact (e.g., what happens when feed_id and view_mode conflict). While it mentions some filtering capabilities, it doesn't provide enough context for an agent to understand the full behavioral scope of this list-retrieval operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal parameter semantics beyond what the schema provides. It mentions special feed_id values (-4 through 0) which are already documented in the schema's description field, and mentions view_mode filtering which is also in the schema. With 100% schema description coverage, the baseline is 3, and the description doesn't significantly enhance understanding of parameter meanings or interactions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as '获取文章标题列表' (get article headline list), which is a specific verb+resource combination. It distinguishes itself from siblings like get_article (which retrieves full content) and search_articles (which searches). However, it doesn't explicitly differentiate from get_feeds or get_categories, which might retrieve different types of lists.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some implied usage context by mentioning special feed_id values and view_mode filtering, suggesting this is for retrieving filtered article lists. However, it doesn't explicitly state when to use this tool versus alternatives like search_articles or get_article, nor does it mention prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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