zulip_add_reaction
Add emoji reactions to Zulip messages to express responses, acknowledge content, or participate in conversations without typing replies.
Instructions
Add an emoji reaction to a message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message_id | Yes | The ID of the message to react to | |
| emoji_name | Yes | Emoji name without colons |
Implementation Reference
- index.ts:453-467 (handler)MCP CallToolRequest handler case for 'zulip_add_reaction': parses arguments, validates required fields, invokes ZulipClient.addReaction, and returns JSON response or error.case "zulip_add_reaction": { const args = request.params.arguments as unknown as AddReactionArgs; if (args.message_id === undefined || !args.emoji_name) { throw new Error( "Missing required arguments: message_id and emoji_name" ); } const response = await zulipClient.addReaction( args.message_id, args.emoji_name ); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
- index.ts:137-154 (schema)Tool metadata and input schema definition for 'zulip_add_reaction', specifying required message_id (number) and emoji_name (string).const addReactionTool: Tool = { name: "zulip_add_reaction", description: "Add an emoji reaction to a message", inputSchema: { type: "object", properties: { message_id: { type: "number", description: "The ID of the message to react to", }, emoji_name: { type: "string", description: "Emoji name without colons", }, }, required: ["message_id", "emoji_name"], }, };
- index.ts:294-304 (helper)ZulipClient helper method that performs the actual API call to add reaction using zulip-js client.reactions.add.async addReaction(messageId: number, emojiName: string) { try { return await this.client.reactions.add({ message_id: messageId, emoji_name: emojiName, }); } catch (error) { console.error("Error adding reaction:", error); throw error; } }
- index.ts:538-547 (registration)Tool registration: 'addReactionTool' is included in the list of available tools returned by ListToolsRequest handler.tools: [ listChannelsTool, postMessageTool, sendDirectMessageTool, addReactionTool, getChannelHistoryTool, getTopicsTool, subscribeToChannelTool, getUsersTool, ],
- index.ts:46-48 (schema)TypeScript interface defining arguments for zulip_add_reaction tool.interface AddReactionArgs { message_id: number; emoji_name: string;