Skip to main content
Glama

add-emoji-reaction

Add an emoji reaction to a message using emoji name or custom emoji. Specify message ID and emoji details for reaction.

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 tool handler for 'add-emoji-reaction'. Registers the tool via server.tool() and contains the async handler that calls zulipClient.addReaction().
    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 for add-emoji-reaction: message_id, emoji_name, emoji_code (optional), and reaction_type (optional enum).
    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")
    });
  • The ZulipClient.addReaction() helper method that sends a POST request to /messages/{messageId}/reactions with the emoji payload.
    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);
    }
  • src/server.ts:19-19 (registration)
    Import of AddReactionSchema from types.ts, needed for registration of the tool.
    AddReactionSchema,
  • src/types.ts:255-255 (registration)
    Type inference for AddReactionParams from the schema.
    export type AddReactionParams = z.infer<typeof AddReactionSchema>;
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It only states the basic operation without addressing idempotency, error handling, authentication requirements, or impact of duplicate reactions.

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

Conciseness4/5

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

The description is a single sentence that communicates the core purpose without redundancy. However, it is so minimal that it does not add much value beyond the tool name.

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?

Given the tool has 4 parameters and no annotations or output schema, the description is insufficient. It does not explain optional parameter behavior, return values, or edge cases, relying entirely on schema descriptions.

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?

Input schema has 100% description coverage, so the schema already documents each parameter. The tool description adds no extra meaning beyond the schema, resulting in a baseline score.

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 an emoji reaction') and the target resource ('to a message'), distinguishing it from siblings like 'remove-emoji-reaction'. However, it lacks any additional specificity about context or scope.

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?

No guidance is provided on when to use this tool versus alternatives (e.g., remove-emoji-reaction). The description does not mention any prerequisites or exclusions.

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