Skip to main content
Glama

add_reaction

Add an emoji reaction to a message by providing the message ID and emoji type.

Instructions

[Official API] Add an emoji reaction to a message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYesMessage ID (om_xxx)
emoji_typeYesEmoji type string, e.g. "THUMBSUP", "SMILE", "HEART"

Implementation Reference

  • Schema definition for the 'add_reaction' tool, describing input (message_id and emoji_type).
    {
      name: 'add_reaction',
      description: '[Official API] Add an emoji reaction to a message.',
      inputSchema: {
        type: 'object',
        properties: {
          message_id: { type: 'string', description: 'Message ID (om_xxx)' },
          emoji_type: { type: 'string', description: 'Emoji type string, e.g. "THUMBSUP", "SMILE", "HEART"' },
        },
        required: ['message_id', 'emoji_type'],
      },
    },
  • Handler function for 'add_reaction' that calls ctx.getOfficialClient().addReaction() and returns a text response with the reactionId.
    async add_reaction(args, ctx) {
      return text(`Reaction added: ${(await ctx.getOfficialClient().addReaction(args.message_id, args.emoji_type)).reactionId}`);
    },
  • Low-level helper method 'addReaction' on the official IM client. Calls the Feishu SDK im.messageReaction.create API.
    async addReaction(messageId, emojiType) {
      const res = await this._safeSDKCall(
        () => this.client.im.messageReaction.create({
          path: { message_id: messageId },
          data: { reaction_type: { emoji_type: emojiType } },
        }),
        'addReaction'
      );
      return { reactionId: res.data.reaction_id };
    },
  • src/server.js:47-57 (registration)
    Registration: src/tools/messaging-bot.js is required in TOOL_MODULES list (line 47), then its schemas are flattened into TOOLS and handlers into HANDLERS (lines 56-57).
      require('./tools/messaging-bot'),
      require('./tools/messaging-user'),
      require('./tools/okr'),
      require('./tools/profile'),
      require('./tools/tasks'),
      require('./tools/uploads'),
      require('./tools/wiki'),
    ];
    
    const TOOLS = TOOL_MODULES.flatMap((m) => m.schemas);
    const HANDLERS = Object.fromEntries(TOOL_MODULES.flatMap((m) => Object.entries(m.handlers)));
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only states 'Add' (indicating mutation) but does not disclose effects like idempotency, required permissions, or behavior when the reaction already exists.

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 concise (one sentence plus a prefix), but the '[Official API]' prefix is unnecessary and slightly detracts from conciseness. Overall, it is front-loaded and efficient.

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 lack of output schema and annotations, the description should explain return values, error conditions, or prerequisites (e.g., message existence). It does not, leaving the agent with incomplete context.

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 coverage is 100%, so the input schema already fully describes the two parameters. The description adds no extra meaning beyond what the schema provides, meeting the baseline of 3.

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 clearly states the action: 'Add an emoji reaction to a message.' It uses a specific verb ('Add') and resource ('emoji reaction to a message'), and it distinguishes from the sibling tool 'delete_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?

The description provides no guidance on when to use this tool versus alternatives (e.g., when to use add_reaction vs. other tools), nor does it mention any prerequisites or contexts where this tool should not be used.

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/EthanQC/feishu-user-plugin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server