Skip to main content
Glama

zulip_get_topics

Retrieve conversation topics from a Zulip channel to access discussion threads and monitor ongoing conversations within a workspace.

Instructions

Get topics in a channel (stream)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYesThe ID of the stream

Implementation Reference

  • Handler for the zulip_get_topics tool. Extracts channel_id from arguments, validates it, calls ZulipClient.getTopics, and returns the JSON response.
    case "zulip_get_topics": {
      const args = request.params.arguments as unknown as GetTopicsArgs;
      if (args.channel_id === undefined) {
        throw new Error("Missing required argument: channel_id");
      }
      const response = await zulipClient.getTopics(args.channel_id);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Tool schema definition for zulip_get_topics, including name, description, and input schema requiring channel_id.
    const getTopicsTool: Tool = {
      name: "zulip_get_topics",
      description: "Get topics in a channel (stream)",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: {
            type: "number",
            description: "The ID of the stream",
          },
        },
        required: ["channel_id"],
      },
    };
  • ZulipClient helper method that retrieves topics for a given stream_id using the Zulip API.
    async getTopics(streamId: number) {
      try {
        return await this.client.streams.topics.retrieve({ stream_id: streamId });
      } catch (error) {
        console.error("Error getting topics:", error);
        throw error;
      }
    }
  • index.ts:535-549 (registration)
    Registration of tools list including zulip_get_topics (via getTopicsTool) in the ListToolsRequest handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      console.error("Received ListToolsRequest");
      return {
        tools: [
          listChannelsTool,
          postMessageTool,
          sendDirectMessageTool,
          addReactionTool,
          getChannelHistoryTool,
          getTopicsTool,
          subscribeToChannelTool,
          getUsersTool,
        ],
      };
    });
  • TypeScript interface defining input arguments for zulip_get_topics tool.
    interface GetTopicsArgs {
      channel_id: number;
    }
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 the basic action but lacks critical details: it doesn't specify if this is a read-only operation, what the output format looks like (e.g., list of topics with metadata), whether there are rate limits, or if authentication is required. This leaves significant gaps for an agent to understand the tool's behavior.

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 extremely concise—a single, clear sentence that directly states the tool's purpose without any fluff. It is front-loaded with the core action and resource, making it efficient and easy to parse. Every word earns its place.

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 (one required parameter, no nested objects) and the lack of annotations and output schema, the description is minimally adequate. It states what the tool does but doesn't provide enough context for full understanding, such as output details or behavioral traits. This meets the minimum viable threshold but has clear gaps.

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, with the single parameter 'channel_id' clearly documented as 'The ID of the stream'. The description adds no additional parameter information beyond what the schema provides, such as format examples or constraints. According to the rules, with high schema coverage, the baseline is 3 even without param details in the description.

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 action ('Get topics') and the resource ('in a channel (stream)'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'zulip_get_channel_history' which might also retrieve channel-related information, preventing a perfect score.

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. For example, it doesn't specify if this is for listing all topics versus searching for specific ones, or how it differs from 'zulip_get_channel_history' which might include topic information. No exclusions or prerequisites are mentioned.

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