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

  • Handler logic for executing the zulip_list_channels tool: casts arguments to ListChannelsArgs and calls zulipClient.getStreams to fetch 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) }], }; }
  • Input schema for zulip_list_channels tool defining optional boolean parameters to filter the list of channels.
    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, }, }, },
  • index.ts:67-90 (registration)
    Registration of the zulip_list_channels tool as a Tool object, including name, description, and schema; returned in ListTools response.
    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, }, }, }, };
  • Type definition for arguments used in zulip_list_channels handler.
    interface ListChannelsArgs { include_private?: boolean; include_web_public?: boolean; include_subscribed?: boolean; }
  • Core helper method in ZulipClient that implements channel listing by retrieving streams from Zulip API with filter parameters.
    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; } }

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