Skip to main content
Glama

discord_add_reaction

React to a specific Discord message with an emoji by providing the channel ID, message ID, and emoji identifier. Simplifies emoji interaction in Discord via MCP-Discord server.

Instructions

Adds an emoji reaction to a specific Discord message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelIdYes
emojiYes
messageIdYes

Implementation Reference

  • The main handler function that parses arguments using AddReactionSchema, fetches the channel and message, adds the reaction using Discord.js message.react(emoji), and returns success or error response.
    export async function addReactionHandler(
      args: unknown, 
      context: ToolContext
    ): Promise<ToolResponse> {
      const { channelId, messageId, emoji } = AddReactionSchema.parse(args);
      try {
        if (!context.client.isReady()) {
          return {
            content: [{ type: "text", text: "Discord client not logged in." }],
            isError: true
          };
        }
    
        const channel = await context.client.channels.fetch(channelId);
        if (!channel || !channel.isTextBased() || !('messages' in channel)) {
          return {
            content: [{ type: "text", text: `Cannot find text channel with ID: ${channelId}` }],
            isError: true
          };
        }
    
        const message = await channel.messages.fetch(messageId);
        if (!message) {
          return {
            content: [{ type: "text", text: `Cannot find message with ID: ${messageId}` }],
            isError: true
          };
        }
    
        // Add the reaction
        await message.react(emoji);
    
        return {
          content: [{ 
            type: "text", 
            text: `Successfully added reaction ${emoji} to message ID: ${messageId}` 
          }]
        };
      } catch (error) {
        return handleDiscordError(error);
      }
    }
  • Zod schema for input validation of the discord_add_reaction tool parameters: channelId, messageId, emoji.
    export const AddReactionSchema = z.object({
        channelId: z.string(),
        messageId: z.string(),
        emoji: z.string()
    });
  • src/server.ts:143-146 (registration)
    Switch case in server.ts that registers and dispatches the discord_add_reaction tool call to the addReactionHandler function.
    case "discord_add_reaction":
      this.logClientState("before discord_add_reaction handler");
      toolResponse = await addReactionHandler(args, this.toolContext);
      return toolResponse;
  • MCP tool definition including name, description, and JSON input schema for the discord_add_reaction tool, used in listTools response.
    {
      name: "discord_add_reaction",
      description: "Adds an emoji reaction to a specific Discord message",
      inputSchema: {
        type: "object",
        properties: {
          channelId: { type: "string" },
          messageId: { type: "string" },
          emoji: { type: "string" }
        },
        required: ["channelId", "messageId", "emoji"]
      }
    },
  • src/server.ts:66-70 (registration)
    Registration of the tool list handler that returns the toolList containing the discord_add_reaction tool definition.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: toolList
      };
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but doesn't mention whether this requires specific permissions, if there are rate limits, what happens on success/failure, or if it's idempotent. For a mutation tool with zero annotation coverage, this is a significant gap.

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 with no wasted words. It's appropriately sized for the tool's complexity and front-loads the core purpose immediately.

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's mutation nature, lack of annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't address permissions, error conditions, return values, or parameter details, leaving critical gaps for an agent to use it correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate by explaining parameters. It doesn't mention any of the three required parameters (channelId, messageId, emoji), their formats, or examples. This leaves the agent guessing about input requirements.

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 ('Adds an emoji reaction') and the target ('to a specific Discord message'), which is specific and unambiguous. However, it doesn't explicitly differentiate from its sibling tool 'discord_remove_reaction' or 'discord_add_multiple_reactions', which would be needed for a perfect score.

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 like 'discord_add_multiple_reactions' for multiple emojis or 'discord_remove_reaction' for removal. It also doesn't mention prerequisites such as needing proper permissions or message visibility.

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

Related 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/barryyip0625/mcp-discord'

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