Skip to main content
Glama

get_categories

Retrieve tt-rss categories with unread counts. Filter to show only categories containing unread articles or include empty categories as needed.

Instructions

获取 tt-rss 的分类列表,包含各分类的未读数。可选只返回有未读文章的分类。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unread_onlyNo仅返回有未读文章的分类
enable_nestedNo嵌套模式,只返回顶级分类
include_emptyNo包含空分类

Implementation Reference

  • Registration of the 'get_categories' tool using server.tool.
    server.tool(
      "get_categories",
      "获取 tt-rss 的分类列表,包含各分类的未读数。可选只返回有未读文章的分类。",
      {
        unread_only: z
          .boolean()
          .default(false)
          .describe("仅返回有未读文章的分类"),
        enable_nested: z
          .boolean()
          .default(false)
          .describe("嵌套模式,只返回顶级分类"),
        include_empty: z
          .boolean()
          .default(true)
          .describe("包含空分类"),
      },
      async (params) => {
        try {
          const categories = await client.getCategories(params);
          return {
            content: [{ type: "text" as const, text: JSON.stringify(categories, null, 2) }],
          };
        } catch (e: unknown) {
          return {
            content: [{ type: "text" as const, text: `获取分类失败: ${(e as Error).message}` }],
            isError: true,
          };
        }
      },
    );
  • The actual implementation that calls the backend API for 'get_categories'.
    async getCategories(params: {
      unread_only?: boolean;
      enable_nested?: boolean;
      include_empty?: boolean;
    } = {}): Promise<TtrssCategory[]> {
      return this.request<TtrssCategory[]>("getCategories", params);
    }
Behavior3/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 adds some context by mentioning the optional filtering for categories with unread articles, but does not cover other behavioral aspects such as authentication needs, rate limits, error handling, or the format of the returned data. This leaves gaps in understanding how the tool behaves beyond its basic function.

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

Conciseness5/5

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

The description is extremely concise and front-loaded, consisting of a single sentence that efficiently conveys the tool's purpose and key optional feature. Every word earns its place, with no redundant or unnecessary information, making it easy for an AI agent to parse quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (3 parameters, no annotations, no output schema), the description is somewhat complete but has gaps. It covers the purpose and hints at one parameter's use, but lacks details on behavioral traits, output format, and broader context. This is adequate for a read-only list tool but could be more informative to fully guide an agent.

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 three parameters thoroughly. The description adds minimal value by implying the 'unread_only' parameter's functionality ('可选只返回有未读文章的分类' meaning 'optionally return only categories with unread articles'), but does not provide additional semantics beyond what the schema offers. This meets the baseline for high schema coverage.

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

Purpose5/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 with a specific verb ('获取' meaning 'get') and resource ('分类列表' meaning 'category list'), and explicitly distinguishes it from siblings by mentioning '未读数' (unread counts) which no other tool in the sibling list addresses. It provides a complete picture of what the tool does.

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

Usage Guidelines4/5

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

The description provides clear context on when to use this tool by specifying '获取 tt-rss 的分类列表,包含各分类的未读数' (get tt-rss category list including unread counts for each category), which helps differentiate it from other list-related tools like get_feeds or get_headlines. However, it does not explicitly state when not to use it or name specific alternatives, which prevents a perfect score.

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