Skip to main content
Glama

search_articles

Search for keywords across Tiny Tiny RSS articles with customizable filters for feeds, categories, and view modes to find relevant content.

Instructions

在文章中搜索关键词。search_mode: all_feeds=全部源, this_feed=当前源, this_cat=当前分类

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchYes搜索关键词
feed_idNo在哪个源中搜索,-4=全部
search_modeNo搜索范围all_feeds
limitNo返回数量限制
view_modeNo过滤模式all_articles

Implementation Reference

  • Implementation and registration of the "search_articles" tool.
    server.tool(
      "search_articles",
      "在文章中搜索关键词。search_mode: all_feeds=全部源, this_feed=当前源, this_cat=当前分类",
      {
        search: z.string().describe("搜索关键词"),
        feed_id: z.number().default(-4).describe("在哪个源中搜索,-4=全部"),
        search_mode: z
          .enum(["all_feeds", "this_feed", "this_cat"])
          .default("all_feeds")
          .describe("搜索范围"),
        limit: z.number().default(20).describe("返回数量限制"),
        view_mode: z
          .enum(["all_articles", "unread", "adaptive", "marked", "updated"])
          .default("all_articles")
          .describe("过滤模式"),
      },
      async (params) => {
        try {
          const headlines = await client.getHeadlines({
            feed_id: params.feed_id,
            search: params.search,
            search_mode: params.search_mode,
            limit: params.limit,
            view_mode: params.view_mode,
            show_excerpt: true,
          });
          const simplified = headlines.map((h) => ({
            id: h.id,
            title: h.title,
            feed_title: h.feed_title,
            link: h.link,
            updated: new Date(h.updated * 1000).toISOString(),
            excerpt: h.excerpt,
            author: h.author,
          }));
          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 only mentions search_mode options without explaining critical behaviors like pagination, rate limits, authentication requirements, error handling, or what happens when no results are found. For a search tool with 5 parameters, this leaves significant gaps in understanding how the tool behaves in practice.

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

Conciseness3/5

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

The description is brief but could be better structured. The first sentence clearly states the purpose, but the second sentence is a parenthetical list of search_mode options that might be better integrated. While concise, it doesn't optimally front-load the most critical information about tool behavior.

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 search tool with 5 parameters and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (e.g., article metadata, full text, relevance scoring), how results are ordered, or whether there are limitations like maximum search terms. Without annotations or output schema, users lack crucial information about the tool's operation and results.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value by listing search_mode enum values with Chinese translations, but doesn't provide additional semantic context beyond what's in the schema. This meets the baseline expectation when schema coverage is complete.

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: '在文章中搜索关键词' (search for keywords in articles). It specifies the verb (搜索/search) and resource (文章/articles), making the intent unambiguous. However, it doesn't explicitly differentiate this tool from potential siblings like 'get_headlines' or 'get_article', which might also retrieve article content.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It lists search_mode options but doesn't explain scenarios where one would choose this tool over other article-related tools like 'get_headlines' or 'get_article'. There's no mention of prerequisites, context, or exclusions for usage.

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