Skip to main content
Glama

zulip_send_direct_message

Send direct messages to specific users in Zulip workspaces using email addresses or user IDs for private communication.

Instructions

Send a direct message to one or more users

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recipientsYesEmail addresses or user IDs of recipients
contentYesThe message content to send

Implementation Reference

  • MCP tool handler switch case that processes the zulip_send_direct_message request by calling the ZulipClient's sendDirectMessage method with validated arguments.
    case "zulip_send_direct_message": { const args = request.params.arguments as unknown as SendDirectMessageArgs; if (!args.recipients || !args.content) { throw new Error( "Missing required arguments: recipients and content" ); } const response = await zulipClient.sendDirectMessage( args.recipients, args.content ); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
  • Tool definition including name, description, and input schema for validation.
    const sendDirectMessageTool: Tool = { name: "zulip_send_direct_message", description: "Send a direct message to one or more users", inputSchema: { type: "object", properties: { recipients: { type: "array", items: { type: "string", }, description: "Email addresses or user IDs of recipients", }, content: { type: "string", description: "The message content to send", }, }, required: ["recipients", "content"], }, };
  • ZulipClient method that performs the actual API call to send a direct message using the Zulip JS client.
    async sendDirectMessage(recipients: string[], content: string) { try { const params = { to: recipients, type: "private", content: content, }; return await this.client.messages.send(params); } catch (error) { console.error("Error sending direct message:", error); throw error; } }

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