Skip to main content
Glama

remove-emoji-reaction

Remove an emoji reaction from a Zulip message by specifying the message ID and emoji name or Unicode code. Simplifies managing reactions in collaborative workflows.

Instructions

Remove an emoji reaction from a message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emoji_codeNoUnicode code point for the emoji
emoji_nameYesEmoji name to remove (e.g., 'thumbs_up', 'heart')
message_idYesID of the message to remove reaction from
reaction_typeNoType of emoji reaction

Implementation Reference

  • The handler function that implements the core logic of the remove-emoji-reaction tool by invoking the Zulip client method and handling responses.
    async ({ message_id, emoji_name, emoji_code, reaction_type }) => { try { await zulipClient.removeReaction(message_id, { emoji_name, emoji_code, reaction_type }); return createSuccessResponse(`Reaction ${emoji_name} removed from message ${message_id}!`); } catch (error) { return createErrorResponse(`Error removing reaction: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
  • Zod schema defining the input parameters and validation for the remove-emoji-reaction tool.
    export const RemoveReactionSchema = z.object({ message_id: z.number().describe("ID of the message to remove reaction from"), emoji_name: z.string().describe("Emoji name to remove (e.g., 'thumbs_up', 'heart')"), emoji_code: z.string().optional().describe("Unicode code point for the emoji"), reaction_type: z.enum(["unicode_emoji", "realm_emoji", "zulip_extra_emoji"]).optional().describe("Type of emoji reaction") });
  • src/server.ts:916-932 (registration)
    Registers the remove-emoji-reaction tool with the MCP server, including name, description, schema, and inline handler.
    server.tool( "remove-emoji-reaction", "Remove an emoji reaction from a message.", RemoveReactionSchema.shape, async ({ message_id, emoji_name, emoji_code, reaction_type }) => { try { await zulipClient.removeReaction(message_id, { emoji_name, emoji_code, reaction_type }); return createSuccessResponse(`Reaction ${emoji_name} removed from message ${message_id}!`); } catch (error) { return createErrorResponse(`Error removing reaction: ${error instanceof Error ? error.message : 'Unknown error'}`); } } );
  • Zulip client helper method that makes the actual DELETE API request to remove the emoji reaction from Zulip.
    async removeReaction(messageId: number, params: { emoji_name: string; emoji_code?: string; reaction_type?: string; }): Promise<void> { const queryParams = new URLSearchParams(); queryParams.append('emoji_name', params.emoji_name); if (params.emoji_code) {queryParams.append('emoji_code', params.emoji_code);} if (params.reaction_type) {queryParams.append('reaction_type', params.reaction_type);} await this.client.delete(`/messages/${messageId}/reactions?${queryParams.toString()}`); }

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