Skip to main content
Glama
lars-hagen

Slack User MCP Server

by lars-hagen

slack_add_reaction

Add an emoji reaction to a specific message in a Slack channel using channel ID, message timestamp, and reaction name.

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

  • MCP tool handler for 'slack_add_reaction': validates arguments and calls 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) }],
      };
    }
  • SlackClient method that performs the HTTP POST to Slack's reactions.add API to add the reaction.
    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.headers,
        body: JSON.stringify({
          channel: channel_id,
          timestamp: timestamp,
          name: reaction,
        }),
      });
    
      return response.json();
    }
  • Tool schema definition including 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"],
      },
    };
  • TypeScript interface defining the arguments for slack_add_reaction tool.
    interface AddReactionArgs {
      channel_id: string;
      timestamp: string;
      reaction: string;
    }
  • index.ts:532-546 (registration)
    Registers the slack_add_reaction tool (as addReactionTool) in the list of available tools returned by ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      console.error("Received ListToolsRequest");
      return {
        tools: [
          listChannelsTool,
          postMessageTool,
          replyToThreadTool,
          addReactionTool,
          getChannelHistoryTool,
          getThreadRepliesTool,
          getUsersTool,
          getUserProfileTool,
        ],
      };
    });
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It doesn't mention permissions required, rate limits, whether reactions are reversible, or what happens on success/failure (e.g., no output schema). For a mutation tool with zero annotation coverage, this is inadequate.

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 that directly states the tool's purpose with zero wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks context on permissions, error handling, or behavioral details needed for safe invocation. While the schema covers parameters well, the overall tool context remains underspecified for practical use.

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., no examples of reaction names or timestamp formats), meeting the baseline for high coverage but not enhancing parameter understanding.

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') and resource ('reaction emoji to a message'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'slack_post_message' or 'slack_reply_to_thread' which also interact with messages, missing the opportunity to clarify this is specifically for reactions rather than message content.

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 channel access), exclusions (e.g., not for threads without specifying), or how it differs from sibling tools like 'slack_reply_to_thread' for message interactions, leaving usage context unclear.

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/lars-hagen/slack-user-mcp'

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