Skip to main content
Glama

edit-scheduled-message

Change the content, recipients, topic, or delivery time of a scheduled message using its unique ID. Supports stream and direct messages in Zulip workspaces.

Instructions

Modify a scheduled message before it's sent. For direct messages, use comma-separated email addresses or get user info from the users-directory resource (zulip://users).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoNew message content
scheduled_delivery_timestampNoNew delivery timestamp
scheduled_message_idYesUnique scheduled message ID to edit
toNoRecipients (channel name or comma-separated emails)
topicNoNew topic for stream messages
typeNoMessage type

Implementation Reference

  • MCP tool registration and inline handler function for 'edit-scheduled-message'. Validates input, filters parameters, calls ZulipClient.editScheduledMessage, and formats MCP-compliant response.
    server.tool( "edit-scheduled-message", "Modify a scheduled message before it's sent. For direct messages, use comma-separated email addresses or get user info from the users-directory resource (zulip://users).", EditScheduledMessageSchema.shape, async ({ scheduled_message_id, type, to, content, topic, scheduled_delivery_timestamp }) => { try { const updateParams = filterUndefined({ type, to, content, topic, scheduled_delivery_timestamp }); if (Object.keys(updateParams).length === 0) { return createErrorResponse('At least one parameter must be provided to update scheduled message'); } await zulipClient.editScheduledMessage(scheduled_message_id, updateParams); return createSuccessResponse(`Scheduled message ${scheduled_message_id} updated successfully!`); } catch (error) { return createErrorResponse(`Error editing scheduled message: ${error instanceof Error ? error.message : 'Unknown error'}`); } } );
  • Zod schema defining the input parameters and validation for the 'edit-scheduled-message' tool.
    export const EditScheduledMessageSchema = z.object({ scheduled_message_id: z.number().describe("Unique scheduled message ID to edit"), type: z.enum(["stream", "direct"]).optional().describe("Message type"), to: z.string().optional().describe("Recipients (channel name or comma-separated emails)"), content: z.string().optional().describe("New message content"), topic: z.string().optional().describe("New topic for stream messages"), scheduled_delivery_timestamp: z.number().optional().describe("New delivery timestamp") });
  • ZulipClient helper method that executes the actual Zulip API PATCH request to update the scheduled message.
    async editScheduledMessage(scheduledMessageId: number, params: { type?: 'stream' | 'direct'; to?: string; content?: string; topic?: string; scheduled_delivery_timestamp?: number; }): Promise<void> { // Filter out undefined values const filteredParams = Object.fromEntries( Object.entries(params).filter(([, value]) => value !== undefined) ); await this.client.patch(`/scheduled_messages/${scheduledMessageId}`, filteredParams); }

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