Skip to main content
Glama

zulip_subscribe_to_channel

Subscribe the bot to a Zulip channel (stream) to enable message posting and interaction within that specific conversation space.

Instructions

Subscribe the bot to a channel (stream)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_nameYesThe name of the stream to subscribe to

Implementation Reference

  • The handler function within the CallToolRequest switch statement that executes the zulip_subscribe_to_channel tool. It validates the input arguments and calls the ZulipClient's subscribeToStream method to perform the subscription.
    case "zulip_subscribe_to_channel": {
      const args = request.params.arguments as unknown as SubscribeToChannelArgs;
      if (!args.channel_name) {
        throw new Error("Missing required argument: channel_name");
      }
      const response = await zulipClient.subscribeToStream(args.channel_name);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • JSON Schema defining the input parameters for the zulip_subscribe_to_channel tool, specifying channel_name as a required string.
    inputSchema: {
      type: "object",
      properties: {
        channel_name: {
          type: "string",
          description: "The name of the stream to subscribe to",
        },
      },
      required: ["channel_name"],
    },
  • index.ts:200-213 (registration)
    The Tool object registration that defines the name, description, and input schema for zulip_subscribe_to_channel, used in ListToolsRequest response.
    const subscribeToChannelTool: Tool = {
      name: "zulip_subscribe_to_channel",
      description: "Subscribe the bot to a channel (stream)",
      inputSchema: {
        type: "object",
        properties: {
          channel_name: {
            type: "string",
            description: "The name of the stream to subscribe to",
          },
        },
        required: ["channel_name"],
      },
    };
  • Helper method in ZulipClient class that performs the actual Zulip API call to subscribe to the specified stream/channel.
    async subscribeToStream(streamName: string) {
      try {
        const subscriptions = [{ name: streamName }];
        return await this.client.streams.subscribe({ subscriptions: JSON.stringify(subscriptions) });
      } catch (error) {
        console.error("Error subscribing to stream:", error);
        throw error;
      }
    }
  • TypeScript interface used for type-checking the tool's input arguments in the handler.
    interface SubscribeToChannelArgs {
      channel_name: string;
    }
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 does not explain what this entails—e.g., whether it requires admin permissions, if it's idempotent (safe to call multiple times), or what happens on success/failure. This leaves significant gaps for a mutation tool.

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 that directly states the tool's purpose without any fluff or redundancy. It is front-loaded and appropriately sized for a simple tool with one parameter.

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 that this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., permissions, idempotency) and expected outcomes, which are crucial for an agent to use it correctly in context.

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 input schema has 100% description coverage, with 'channel_name' clearly documented as 'The name of the stream to subscribe to'. The description adds no additional parameter semantics beyond this, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Subscribe') and the target ('the bot to a channel (stream)'), making the purpose specific and unambiguous. It distinguishes this tool from siblings like 'zulip_list_channels' (list) or 'zulip_post_message' (post), as it focuses on subscription management.

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, such as whether it's for initial setup, re-subscription, or specific contexts. It lacks any mention of prerequisites (e.g., bot permissions) or exclusions, leaving usage 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/Monadical-SAS/zulip-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server