Skip to main content
Glama

zulip_post_message

Post messages to Zulip channels with specified topics, enabling AI assistants to communicate in team workspaces through structured conversations.

Instructions

Post a new message to a Zulip channel (stream)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_nameYesThe name of the stream to post to
topicYesThe topic within the stream
contentYesThe message content to post

Implementation Reference

  • The main handler for the zulip_post_message tool in the CallToolRequest handler. Validates required arguments (channel_name, topic, content) and calls ZulipClient.sendStreamMessage to execute the tool logic.
    case "zulip_post_message": { const args = request.params.arguments as unknown as PostMessageArgs; if (!args.channel_name || !args.topic || !args.content) { throw new Error( "Missing required arguments: channel_name, topic, and content" ); } const response = await zulipClient.sendStreamMessage( args.channel_name, args.topic, args.content ); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
  • ZulipClient helper method that implements the core logic for posting a message to a Zulip stream using the zulip-js client.
    async sendStreamMessage(streamName: string, topic: string, content: string) { try { const params = { to: streamName, type: "stream", topic: topic, content: content, }; return await this.client.messages.send(params); } catch (error) { console.error("Error sending stream message:", error); throw error; } }
  • Tool schema definition including name, description, input properties, and required fields for the zulip_post_message tool.
    const postMessageTool: Tool = { name: "zulip_post_message", description: "Post a new message to a Zulip channel (stream)", inputSchema: { type: "object", properties: { channel_name: { type: "string", description: "The name of the stream to post to", }, topic: { type: "string", description: "The topic within the stream", }, content: { type: "string", description: "The message content to post", }, }, required: ["channel_name", "topic", "content"], }, };
  • index.ts:537-548 (registration)
    Tool registration via the ListToolsRequest handler, which includes postMessageTool in the returned list of available tools.
    return { tools: [ listChannelsTool, postMessageTool, sendDirectMessageTool, addReactionTool, getChannelHistoryTool, getTopicsTool, subscribeToChannelTool, getUsersTool, ], };
  • TypeScript interface used for type-checking the tool's input arguments in the handler.
    interface PostMessageArgs { channel_name: string; topic: string; content: string; }

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