Skip to main content
Glama

remove-emoji-reaction

Remove an emoji reaction from a Zulip message by specifying the message ID and emoji name.

Instructions

Remove an emoji reaction from a message.

Input Schema

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

Implementation Reference

  • The tool handler for 'remove-emoji-reaction'. Registers the tool with the MCP server, calls zulipClient.removeReaction() with message_id, emoji_name, emoji_code, and reaction_type, and returns a success or error response.
    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'}`);
        }
      }
    );
  • The ZulipClient.removeReaction() method that sends a DELETE request to /messages/{messageId}/reactions with query parameters emoji_name, emoji_code, and reaction_type.
    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()}`);
    }
  • The RemoveReactionSchema Zod schema defining the input parameters: message_id (number), emoji_name (string), emoji_code (optional string), reaction_type (optional enum of unicode_emoji, realm_emoji, zulip_extra_emoji).
    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")
    });
  • TypeScript type RemoveReactionParams inferred from RemoveReactionSchema.
    export type RemoveReactionParams = z.infer<typeof RemoveReactionSchema>;
  • src/server.ts:916-932 (registration)
    The tool is registered via server.tool('remove-emoji-reaction', ...) with the schema and handler function.
    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'}`);
        }
      }
    );
Behavior2/5

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

No annotations provided. Description only states 'remove' without disclosing side effects (e.g., error if reaction missing), auth requirements, or idempotency. Minimal behavioral context.

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?

Single sentence of 7 words, directly stating purpose. No wasted words, front-loaded with action and resource.

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

Completeness3/5

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

Tool has 4 parameters and no output schema. Description is minimal but sufficient for a straightforward deletion action. However, missing context like required conditions or error states.

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% (all 4 parameters have descriptions), so baseline is 3. The description adds no further meaning beyond what the schema already provides.

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

Purpose5/5

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

The description 'Remove an emoji reaction from a message.' uses a specific verb (remove) and resource (emoji reaction), and clearly distinguishes from sibling 'add-emoji-reaction'.

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 on when to use this tool versus alternatives like 'delete-message' or 'add-emoji-reaction'. No mention of prerequisites or context (e.g., reaction must exist, user must own it).

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