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

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