Skip to main content
Glama

get-subscribed-streams

Retrieve all subscribed streams in a Zulip workspace to identify conversation spaces before sending messages. Optionally include subscriber lists for detailed stream insights.

Instructions

📺 USER STREAMS: Get all streams you're subscribed to. Use this to see what streams are available before sending messages. Note: In Zulip, 'streams' and 'channels' refer to the same thing - conversation spaces for teams.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_subscribersNoInclude subscriber lists for streams

Implementation Reference

  • Handler function that executes the get-subscribed-streams tool logic: fetches subscriptions via ZulipClient and returns formatted list.
    async ({ include_subscribers }) => { try { const result = await zulipClient.getSubscriptions(include_subscribers); return createSuccessResponse(JSON.stringify({ subscription_count: result.subscriptions.length, subscriptions: result.subscriptions.map(stream => ({ id: stream.stream_id, name: stream.name, description: stream.description, invite_only: stream.invite_only, is_archived: stream.is_archived, is_announcement_only: stream.is_announcement_only })) }, null, 2)); } catch (error) { return createErrorResponse(`Error getting subscribed streams: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
  • Zod input schema defining optional include_subscribers parameter for the tool.
    export const GetSubscribedStreamsSchema = z.object({ include_subscribers: z.boolean().optional().describe("Include subscriber lists for streams") });
  • src/server.ts:757-778 (registration)
    MCP server.tool registration for get-subscribed-streams, including description, schema, and inline handler.
    "get-subscribed-streams", "📺 USER STREAMS: Get all streams you're subscribed to. Use this to see what streams are available before sending messages. Note: In Zulip, 'streams' and 'channels' refer to the same thing - conversation spaces for teams.", GetSubscribedStreamsSchema.shape, async ({ include_subscribers }) => { try { const result = await zulipClient.getSubscriptions(include_subscribers); return createSuccessResponse(JSON.stringify({ subscription_count: result.subscriptions.length, subscriptions: result.subscriptions.map(stream => ({ id: stream.stream_id, name: stream.name, description: stream.description, invite_only: stream.invite_only, is_archived: stream.is_archived, is_announcement_only: stream.is_announcement_only })) }, null, 2)); } catch (error) { return createErrorResponse(`Error getting subscribed streams: ${error instanceof Error ? error.message : 'Unknown error'}`); } } );
  • ZulipClient helper method that performs the API call to retrieve user's subscribed streams.
    async getSubscriptions(includeSubscribers?: boolean): Promise<{ subscriptions: ZulipStream[] }> { const params = includeSubscribers ? { include_subscribers: true } : {}; const response = await this.client.get('/users/me/subscriptions', { params }); return response.data; }

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/avisekrath/zulip-mcp-server'

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