Skip to main content
Glama

subscribe_feed

Add new RSS feeds to your Tiny Tiny RSS instance by providing the feed URL, optional category, and authentication credentials when required.

Instructions

订阅新的 RSS 源

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feed_urlYesRSS 源的 URL
category_idNo放入的分类 ID,默认 0 (未分类)
loginNo源需要认证时的用户名
passwordNo源需要认证时的密码

Implementation Reference

  • The MCP tool registration and handler logic for "subscribe_feed" which calls the underlying client method.
    server.tool(
      "subscribe_feed",
      "订阅新的 RSS 源",
      {
        feed_url: z.string().url().describe("RSS 源的 URL"),
        category_id: z
          .number()
          .default(0)
          .describe("放入的分类 ID,默认 0 (未分类)"),
        login: z.string().optional().describe("源需要认证时的用户名"),
        password: z.string().optional().describe("源需要认证时的密码"),
      },
      async (params) => {
        try {
          const result = await client.subscribeToFeed(params);
          const code = result.status.code;
          const messages: Record<number, string> = {
            0: "订阅成功",
            1: "已订阅该源",
            2: "无效的 URL",
            3: "URL 中未找到 RSS 源",
            4: "URL 中发现多个 RSS 源 (请指定具体的源地址)",
            5: "无法下载该 URL",
            6: "内容重复",
          };
          const msg = messages[code] ?? `未知状态码: ${code}`;
          if (code !== 0 && code !== 1) {
            return {
              content: [{ type: "text" as const, text: msg }],
              isError: true,
            };
          }
          return { content: [{ type: "text" as const, text: msg }] };
        } catch (e: unknown) {
          return {
            content: [{ type: "text" as const, text: `订阅失败: ${(e as Error).message}` }],
            isError: true,
          };
        }
      },
    );
  • The underlying client method that performs the API request to subscribe to a feed.
    async subscribeToFeed(params: {
      feed_url: string;
      category_id?: number;
      login?: string;
      password?: string;
    }): Promise<{ status: { code: number } }> {
      return this.request("subscribeToFeed", params);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('subscribe') but doesn't explain what happens after subscription (e.g., whether feeds are fetched immediately, if errors occur for invalid URLs, or if it returns a confirmation). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 ('订阅新的 RSS 源'), which directly conveys the core purpose without any wasted words. It's front-loaded and appropriately sized for the tool's function.

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?

Given the tool has no annotations, no output schema, and involves mutation (subscription), the description is incomplete. It doesn't cover behavioral aspects like error handling, return values, or side effects (e.g., how the feed integrates with other tools like 'get_feeds'). For a 4-parameter tool with this complexity, more context is needed.

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 parameters (feed_url, category_id, login, password). The description adds no additional meaning beyond the schema, such as explaining parameter interactions (e.g., login/password are only needed for authenticated feeds) or usage examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 action ('订阅' meaning 'subscribe') and the resource ('新的 RSS 源' meaning 'new RSS feed'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'unsubscribe_feed' or 'get_feeds', but the verb 'subscribe' versus 'unsubscribe' or 'get' provides inherent differentiation.

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 like 'get_feeds' (to list existing feeds) or 'unsubscribe_feed' (to remove feeds). It also doesn't mention prerequisites, such as needing an existing feed URL or authentication details for protected feeds, leaving usage context unclear.

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