Skip to main content
Glama

get-subscribed-streams

Retrieve all channels you are subscribed to in your Zulip workspace to view available conversation spaces before sending messages.

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

  • src/server.ts:756-778 (registration)
    Tool registration for 'get-subscribed-streams' using the MCP server.tool() call, with description and schema reference.
    server.tool(
      "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'}`);
        }
      }
    );
  • Handler function that calls zulipClient.getSubscriptions() and returns formatted stream data.
    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 schema defining the input parameter: optional include_subscribers boolean.
    export const GetSubscribedStreamsSchema = z.object({
      include_subscribers: z.boolean().optional().describe("Include subscriber lists for streams")
    });
  • ZulipClient.getSubscriptions() method that calls the Zulip API endpoint /users/me/subscriptions.
    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;
    }
  • ZulipStream interface defining the shape of stream objects returned by the API.
    export interface ZulipStream {
      stream_id: number;
      name: string;
      description: string;
      invite_only: boolean;
      is_web_public: boolean;
      is_archived: boolean;
      creator_id: number;
      date_created: number;
      first_message_id: number;
      message_retention_days: number | null;
      history_public_to_subscribers: boolean;
      rendered_description: string;
      is_announcement_only: boolean;
      can_remove_subscribers_group: number;
      stream_post_policy: number;
    }
Behavior3/5

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

No annotations provided, so description carries full burden. Implies a read operation but does not disclose behavioral traits like authorization requirements, rate limits, or data freshness. Adequate but limited.

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?

Two concise sentences with no waste. Front-loaded with the core purpose, followed by a usage hint and terminology note. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one optional parameter, no output schema), the description covers purpose, usage context, and terminology clarification. Sufficient for an agent to select and invoke correctly.

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% for the single optional parameter 'include_subscribers'. The description does not add any additional meaning beyond the schema, so baseline 3 applies.

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 'Get all streams you're subscribed to', specifying the verb (get) and resource (subscribed streams). It distinguishes from sibling tools like get-stream-by-id and get-topics-in-stream by focusing on user's subscribed streams.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a concrete use case: 'Use this to see what streams are available before sending messages.' Also clarifies terminology equivalence (streams and channels). Lacks explicit when-not-to-use or alternatives but gives clear context.

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

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