Skip to main content
Glama
z9905080

MCP Server for Slack

by z9905080

slack_add_reaction

Add emoji reactions to Slack messages to acknowledge responses, show agreement, or provide quick feedback in conversations.

Instructions

Add a reaction emoji to a message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYesThe ID of the channel containing the message
timestampYesThe timestamp of the message to react to
reactionYesThe name of the emoji reaction (without ::)

Implementation Reference

  • Executes the slack_add_reaction tool by validating arguments and calling the SlackClient.addReaction method.
    case "slack_add_reaction": {
      const args = request.params.arguments as unknown as AddReactionArgs;
      if (!args.channel_id || !args.timestamp || !args.reaction) {
        throw new Error(
          "Missing required arguments: channel_id, timestamp, and reaction",
        );
      }
      const response = await slackClient.addReaction(
        args.channel_id,
        args.timestamp,
        args.reaction,
      );
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Defines the tool schema, name, description, and input schema for slack_add_reaction.
    const addReactionTool: Tool = {
      name: "slack_add_reaction",
      description: "Add a reaction emoji to a message",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: {
            type: "string",
            description: "The ID of the channel containing the message",
          },
          timestamp: {
            type: "string",
            description: "The timestamp of the message to react to",
          },
          reaction: {
            type: "string",
            description: "The name of the emoji reaction (without ::)",
          },
        },
        required: ["channel_id", "timestamp", "reaction"],
      },
    };
  • index.ts:570-580 (registration)
    Registers the slack_add_reaction tool (as addReactionTool) in the list of available tools returned by ListToolsRequest.
    tools: [
      listChannelsTool,
      postMessageTool,
      replyToThreadTool,
      addReactionTool,
      getChannelHistoryTool,
      getThreadRepliesTool,
      getUsersTool,
      getUserProfileTool,
      lookupUserByEmailTool,
    ],
  • SlackClient method that performs the actual API call to add a reaction to a Slack message.
    async addReaction(
      channel_id: string,
      timestamp: string,
      reaction: string,
    ): Promise<any> {
      const response = await fetch("https://slack.com/api/reactions.add", {
        method: "POST",
        headers: this.botHeaders,
        body: JSON.stringify({
          channel: channel_id,
          timestamp: timestamp,
          name: reaction,
        }),
      });
    
      return response.json();
    }
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. While 'Add' implies a mutation, it doesn't specify permissions required, rate limits, whether reactions are reversible, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 zero waste—it directly states the tool's purpose without unnecessary elaboration. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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 complexity (a mutation with 3 required parameters) and lack of annotations or output schema, the description is incomplete. It doesn't address behavioral aspects like error handling, permissions, or response format, which are crucial for an AI agent to use it correctly in context with sibling tools.

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 three parameters thoroughly. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain emoji format conventions beyond 'without ::' or provide examples). Baseline 3 is appropriate when the schema does the heavy lifting.

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 a reaction emoji') and the target ('to a message'), providing a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from sibling tools like 'slack_post_message' or 'slack_reply_to_thread', which are also message-related actions but serve different purposes.

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), exclusions, or comparisons to sibling tools like 'slack_post_message' for creating messages or 'slack_reply_to_thread' for threaded replies.

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/z9905080/mcp-slack'

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