Skip to main content
Glama

update_article

Modify article statuses in Tiny Tiny RSS by setting, clearing, or toggling starred, published, unread, or note states for specified articles.

Instructions

更新文章状态。field: 0=星标, 1=已发布, 2=未读, 3=笔记。mode: 0=取消, 1=设置, 2=切换。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
article_idsYes文章 ID 列表,逗号分隔 (如 '123,456')
fieldYes操作字段: 0=星标, 1=已发布, 2=未读, 3=笔记
modeYes操作模式: 0=取消, 1=设置, 2=切换
dataNo当 field=3 (笔记) 时,笔记内容

Implementation Reference

  • Registration and tool handler for update_article in src/tools/articles.ts.
    server.tool(
      "update_article",
      "更新文章状态。field: 0=星标, 1=已发布, 2=未读, 3=笔记。mode: 0=取消, 1=设置, 2=切换。",
      {
        article_ids: z.string().describe("文章 ID 列表,逗号分隔 (如 '123,456')"),
        field: z.number().min(0).max(3).describe("操作字段: 0=星标, 1=已发布, 2=未读, 3=笔记"),
        mode: z.number().min(0).max(2).describe("操作模式: 0=取消, 1=设置, 2=切换"),
        data: z.string().optional().describe("当 field=3 (笔记) 时,笔记内容"),
      },
      async (params) => {
        try {
          const result = await client.updateArticle(params);
          return ok(`操作成功,更新了 ${result.updated} 篇文章`);
        } catch (e: unknown) {
          return fail(`更新文章失败: ${(e as Error).message}`);
        }
      },
    );
  • API client method for performing the update_article request.
    async updateArticle(params: {
      article_ids: string;
      mode: number;
      field: number;
      data?: string;
    }): Promise<{ status: string; updated: number }> {
      return this.request("updateArticle", params);
    }

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