Skip to main content
Glama

add_reaction

Add emoji reactions to Slack messages using channel ID, timestamp, and emoji name to express responses or acknowledge content.

Instructions

Add an emoji reaction to a message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYesChannel ID
timestampYesMessage timestamp
nameYesEmoji name (without colons)

Implementation Reference

  • The core handler function that parses arguments using the schema, calls Slack's reactions.add API via the client wrapper, and returns a success response.
    export async function addReaction(client: SlackClientWrapper, args: unknown) { const params = addReactionSchema.parse(args); return await client.safeCall(async () => { await client.getClient().reactions.add({ channel: params.channel, timestamp: params.timestamp, name: params.name, }); return { ok: true, channel: params.channel, timestamp: params.timestamp, reaction: params.name, }; }); }
  • Zod schema defining the input parameters for the add_reaction tool: channel ID, message timestamp, and emoji name.
    export const addReactionSchema = z.object({ channel: channelIdSchema, timestamp: timestampSchema, name: emojiSchema, });
  • src/index.ts:352-373 (registration)
    Tool specification registered for the list_tools endpoint, including name, description, and JSON schema matching the Zod schema.
    { name: 'add_reaction', description: 'Add an emoji reaction to a message', inputSchema: { type: 'object', properties: { channel: { type: 'string', description: 'Channel ID', }, timestamp: { type: 'string', description: 'Message timestamp', }, name: { type: 'string', description: 'Emoji name (without colons)', }, }, required: ['channel', 'timestamp', 'name'], }, },
  • src/index.ts:437-437 (registration)
    Handler mapping in the toolHandlers object that wires the 'add_reaction' tool name to the imported addReaction function.
    add_reaction: (args) => reactionTools.addReaction(slackClient, args),

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

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