Skip to main content
Glama

zulip_list_channels

Retrieve available channels (streams) from a Zulip organization, with options to filter by privacy settings and subscription status.

Instructions

List available channels (streams) in the Zulip organization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_privateNoWhether to include private streams
include_web_publicNoWhether to include web-public streams
include_subscribedNoWhether to include streams the bot is subscribed to

Implementation Reference

  • Dispatches the tool call by parsing arguments and invoking the ZulipClient.getStreams method to list channels.
    case "zulip_list_channels": {
      const args = request.params.arguments as unknown as ListChannelsArgs;
      const response = await zulipClient.getStreams(
        args.include_private,
        args.include_web_public,
        args.include_subscribed
      );
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Defines the tool schema including input validation for parameters like include_private, include_web_public, and include_subscribed.
    const listChannelsTool: Tool = {
      name: "zulip_list_channels",
      description: "List available channels (streams) in the Zulip organization",
      inputSchema: {
        type: "object",
        properties: {
          include_private: {
            type: "boolean",
            description: "Whether to include private streams",
            default: false,
          },
          include_web_public: {
            type: "boolean",
            description: "Whether to include web-public streams",
            default: true,
          },
          include_subscribed: {
            type: "boolean",
            description: "Whether to include streams the bot is subscribed to",
            default: true,
          },
        },
      },
    };
  • ZulipClient method that constructs parameters based on filters and retrieves the list of streams (channels) from the Zulip API.
    async getStreams(includePrivate = false, includeWebPublic = true, includeSubscribed = true) {
      try {
        const params: any = {};
        
        if (includePrivate) {
          params.include_private = true;
        }
        
        if (!includeWebPublic) {
          params.include_web_public = false;
        }
        
        if (!includeSubscribed) {
          params.include_subscribed = false;
        }
        
        return await this.client.streams.retrieve(params);
      } catch (error) {
        console.error("Error getting streams:", error);
        throw error;
      }
    }
  • index.ts:535-549 (registration)
    Registers the zulip_list_channels tool (as listChannelsTool) in the ListTools response for tool discovery.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      console.error("Received ListToolsRequest");
      return {
        tools: [
          listChannelsTool,
          postMessageTool,
          sendDirectMessageTool,
          addReactionTool,
          getChannelHistoryTool,
          getTopicsTool,
          subscribeToChannelTool,
          getUsersTool,
        ],
      };
    });
  • TypeScript interface defining the expected input arguments for the tool.
    interface ListChannelsArgs {
      include_private?: boolean;
      include_web_public?: boolean;
      include_subscribed?: boolean;
    }
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 it's a list operation, implying read-only behavior, but doesn't cover aspects like pagination, rate limits, authentication requirements, or what the output format looks like (e.g., list of objects with IDs and names). This leaves significant gaps for an agent to use it effectively.

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 unnecessary words. It's front-loaded with the core action ('List available channels'), 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?

Given the lack of annotations and output schema, the description is incomplete for a tool with three parameters and no structured output information. It doesn't explain what the list returns (e.g., channel objects with properties), potential limitations, or error cases, leaving the agent with insufficient context for reliable 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?

The input schema has 100% description coverage, clearly documenting all three boolean parameters with defaults. The description adds no parameter-specific information beyond implying a general listing function, so it doesn't enhance the schema's details. This meets the baseline of 3 when schema coverage is high.

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 ('List') and resource ('available channels (streams) in the Zulip organization'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'zulip_get_channel_history' or 'zulip_get_topics', which also retrieve channel-related information but with different scopes.

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 scenarios like initial channel discovery, filtering needs, or how it compares to siblings such as 'zulip_get_channel_history' for historical data or 'zulip_subscribe_to_channel' for subscription management.

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