Skip to main content
Glama

add-emoji-reaction

Add emoji reactions to Zulip messages using emoji names or codes to express responses and engage with content in conversations.

Instructions

Add an emoji reaction to a message.

Input Schema

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

Implementation Reference

  • The main handler function for the 'add-emoji-reaction' tool. It destructures input parameters, calls the ZulipClient.addReaction method, and returns success or error response in MCP format.
    async ({ message_id, emoji_name, emoji_code, reaction_type }) => {
      try {
        await zulipClient.addReaction(message_id, {
          emoji_name,
          emoji_code,
          reaction_type
        });
        return createSuccessResponse(`Reaction ${emoji_name} added to message ${message_id}!`);
      } catch (error) {
        return createErrorResponse(`Error adding reaction: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • src/server.ts:529-545 (registration)
    Registers the 'add-emoji-reaction' tool with the MCP server, specifying name, description, input schema, and handler function.
    server.tool(
      "add-emoji-reaction",
      "Add an emoji reaction to a message.",
      AddReactionSchema.shape,
      async ({ message_id, emoji_name, emoji_code, reaction_type }) => {
        try {
          await zulipClient.addReaction(message_id, {
            emoji_name,
            emoji_code,
            reaction_type
          });
          return createSuccessResponse(`Reaction ${emoji_name} added to message ${message_id}!`);
        } catch (error) {
          return createErrorResponse(`Error adding reaction: ${error instanceof Error ? error.message : 'Unknown error'}`);
        }
      }
    );
  • Zod schema defining the input parameters and validation for the add-emoji-reaction tool.
    export const AddReactionSchema = z.object({
      message_id: z.number().describe("ID of the message to react to"),
      emoji_name: z.string().describe("Emoji name (e.g., 'thumbs_up', 'heart', 'rocket') or custom emoji name"),
      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")
    });
  • ZulipClient helper method that performs the actual API call to add an emoji reaction to a Zulip message.
    async addReaction(messageId: number, params: {
      emoji_name: string;
      emoji_code?: string;
      reaction_type?: string;
    }): Promise<void> {
      const payload: any = {
        emoji_name: params.emoji_name,
        reaction_type: params.reaction_type || 'unicode_emoji'
      };
      if (params.emoji_code !== undefined) {
        payload.emoji_code = params.emoji_code;
      }
      await this.client.post(`/messages/${messageId}/reactions`, payload);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Add' implies a write/mutation operation, the description doesn't specify permissions required, whether reactions are reversible (though 'remove-emoji-reaction' exists), rate limits, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves critical behavioral aspects undocumented.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality without any wasted words. It's appropriately sized for this straightforward tool and gets directly to the point with no unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after adding the reaction, what the return value might be, error conditions, or behavioral constraints. Given the complexity of a write operation interacting with messages and the lack of structured documentation elsewhere, the description should provide more context about the operation's effects and requirements.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add') and target ('emoji reaction to a message'), making the purpose immediately understandable. It distinguishes from siblings like 'remove-emoji-reaction' by specifying the opposite action. However, it doesn't explicitly mention what distinguishes it from other message-modification tools like 'edit-message' or 'send-message' beyond the specific reaction functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing message access), when not to use it, or how it differs from other message-interaction tools like 'edit-message' for adding reactions via text. With many sibling tools available, this lack of contextual guidance is a significant gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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