Skip to main content
Glama

get-subscribed-streams

Retrieve subscribed Zulip conversation spaces to identify available channels before sending messages. Lists streams with optional subscriber information.

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

  • The inline async handler function for the get-subscribed-streams tool. It calls ZulipClient.getSubscriptions, maps the streams data, and returns a formatted JSON response or error.
    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 for get-subscribed-streams tool defining optional include_subscribers parameter.
    export const GetSubscribedStreamsSchema = z.object({
      include_subscribers: z.boolean().optional().describe("Include subscriber lists for streams")
    });
  • src/server.ts:757-778 (registration)
    Registration of the get-subscribed-streams tool in McpServer using server.tool() with name, description, schema, and 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.getSubscriptions method that performs the actual API call to /users/me/subscriptions to fetch the 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;
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It clarifies that 'streams' and 'channels' are synonymous in Zulip, which is useful context. However, it doesn't disclose behavioral traits like whether this is a read-only operation, potential rate limits, authentication needs, or what the return format looks like (e.g., list structure).

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 appropriately sized and front-loaded, with the core purpose stated first ('Get all streams you're subscribed to'), followed by usage guidance and a clarification note. Every sentence adds value without redundancy, making it efficient and well-structured.

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

Completeness3/5

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

Given the tool's low complexity (1 optional parameter, no output schema, no annotations), the description is somewhat complete but has gaps. It explains the purpose and usage context well but lacks details on behavioral aspects like return format or error handling, which are important for a tool with no annotations or output schema.

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 schema description coverage is 100%, so the schema already documents the single parameter 'include_subscribers'. The description doesn't add any parameter-specific information beyond what the schema provides, such as explaining when to use the parameter or its implications. Baseline 3 is appropriate when 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 verb ('Get') and resource ('all streams you're subscribed to'), specifying it's for the current user. It distinguishes from siblings like 'get-stream-by-id' and 'get-stream-id' by focusing on subscribed streams rather than individual streams or IDs.

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?

The description provides clear context for when to use this tool ('to see what streams are available before sending messages'), but it doesn't explicitly state when not to use it or name alternatives. It implies usage relative to messaging tasks but lacks exclusions or direct sibling comparisons.

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