Skip to main content
Glama

set_article_label

Add or remove labels from articles in Tiny Tiny RSS to organize and categorize your feed content effectively.

Instructions

为文章设置或移除标签

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
article_idsYes文章 ID 列表,逗号分隔 (如 '123,456')
label_idYes标签 ID (从 get_labels 获取)
assignYestrue=添加标签, false=移除标签

Implementation Reference

  • Tool handler for `set_article_label` that calls `client.setArticleLabel` and processes the result.
    async (params) => {
      try {
        const result = await client.setArticleLabel(params);
        const action = params.assign ? "添加" : "移除";
        return {
          content: [{ type: "text" as const, text: `${action}标签成功,更新了 ${result.updated} 篇文章` }],
        };
      } catch (e: unknown) {
        return {
          content: [{ type: "text" as const, text: `设置标签失败: ${(e as Error).message}` }],
          isError: true,
        };
      }
    },
  • Registration of the `set_article_label` tool via the MCP server instance.
    server.tool(
      "set_article_label",
      "为文章设置或移除标签",
      {
        article_ids: z.string().describe("文章 ID 列表,逗号分隔 (如 '123,456')"),
        label_id: z.number().describe("标签 ID (从 get_labels 获取)"),
        assign: z.boolean().describe("true=添加标签, false=移除标签"),
      },
      async (params) => {
        try {
          const result = await client.setArticleLabel(params);
          const action = params.assign ? "添加" : "移除";
          return {
            content: [{ type: "text" as const, text: `${action}标签成功,更新了 ${result.updated} 篇文章` }],
          };
        } catch (e: unknown) {
          return {
            content: [{ type: "text" as const, text: `设置标签失败: ${(e as Error).message}` }],
            isError: true,
          };
        }
      },
    );
  • Zod schema definition for `set_article_label` arguments (article_ids, label_id, assign).
    {
      article_ids: z.string().describe("文章 ID 列表,逗号分隔 (如 '123,456')"),
      label_id: z.number().describe("标签 ID (从 get_labels 获取)"),
      assign: z.boolean().describe("true=添加标签, false=移除标签"),
    },
  • The client-side method `setArticleLabel` which sends the `setArticleLabel` request to the tt-rss API.
    async setArticleLabel(params: {
      article_ids: string;
      label_id: number;
      assign: boolean;
    }): Promise<{ status: string; updated: number }> {
      return this.request("setArticleLabel", params);
    }
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 states the action (set/remove labels) but lacks critical details: whether this is a mutation (implied but not explicit), permission requirements, rate limits, or what happens on success/failure. This is inadequate for a tool that modifies data.

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 a single, efficient sentence in Chinese that directly states the tool's function without any fluff. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain the return value, error conditions, or behavioral nuances (e.g., idempotency). Given the complexity of modifying article labels, more context is needed for safe and effective use.

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 fully documents all three parameters. The description adds no additional meaning beyond what the schema provides (e.g., it doesn't explain format constraints or relationships between parameters), meeting the baseline for high coverage.

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 verb ('设置或移除' - set or remove) and resource ('标签' - label) for articles, making the purpose understandable. However, it doesn't differentiate this tool from potential alternatives like 'update_article' which might also handle labels, so it doesn't reach the highest score.

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 doesn't mention prerequisites (e.g., needing to get labels first), nor does it clarify if this is for bulk operations or how it relates to siblings like 'update_article' or 'get_labels'.

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