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) {

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