Skip to main content
Glama

get_labels

Retrieve all configured labels from Tiny Tiny RSS. Optionally check if a specific article has particular labels by providing its article ID.

Instructions

获取所有已配置的标签列表。可传入 article_id 查看该文章是否有某标签。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
article_idNo指定文章 ID 时,返回结果中 checked 表示该文章是否有此标签

Implementation Reference

  • The 'get_labels' tool handler registration and implementation in 'src/tools/labels.ts'.
    server.tool(
      "get_labels",
      "获取所有已配置的标签列表。可传入 article_id 查看该文章是否有某标签。",
      {
        article_id: z
          .number()
          .optional()
          .describe("指定文章 ID 时,返回结果中 checked 表示该文章是否有此标签"),
      },
      async ({ article_id }) => {
        try {
          const labels = await client.getLabels(article_id);
          return {
            content: [{ type: "text" as const, text: JSON.stringify(labels, null, 2) }],
          };
        } catch (e: unknown) {
          return {
            content: [{ type: "text" as const, text: `获取标签失败: ${(e as Error).message}` }],
            isError: true,
          };
        }
      },
    );
  • Registration function for the 'get_labels' tool.
    export function registerLabelTools(server: McpServer, client: TtrssClient) {
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 describes the basic read operation and the effect of the article_id parameter, but doesn't disclose important behavioral traits like whether this requires authentication, rate limits, error conditions, pagination, or what format the label list returns. For a tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 each serve a clear purpose. The first sentence states the core function, and the second explains the optional parameter usage. There's no wasted text or redundancy. However, it could be slightly more structured by separating the core purpose from parameter guidance more explicitly.

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 (1 optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and parameter usage but lacks important contextual information about authentication requirements, return format, error handling, and how this tool relates to sibling operations. Without annotations or output schema, the description should do more to compensate for these gaps.

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 schema description coverage is 100% (the single parameter has a clear description), so the baseline is 3. The description adds some value by explaining the semantic effect of the article_id parameter ('查看该文章是否有某标签' - check if the article has a certain label), which provides context beyond the schema's technical description. However, it doesn't add significant additional parameter semantics beyond what the schema already documents.

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: '获取所有已配置的标签列表' (get all configured labels list). It specifies the verb ('获取' - get) and resource ('标签列表' - labels list), making the basic function clear. However, it doesn't explicitly differentiate this from sibling tools like 'set_article_label' or explain how it differs from other list operations like 'get_categories' or 'get_feeds'.

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 usage context by explaining when to use the optional parameter: '可传入 article_id 查看该文章是否有某标签' (can pass article_id to check if the article has a certain label). This implies usage for checking label assignments. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'set_article_label' or when not to use it, nor does it mention prerequisites or dependencies.

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