add_reaction
React to a specific message in a Discord channel by specifying the channel ID, message ID, and emoji. Integrates directly with MCP for streamlined Discord interactions.
Instructions
Add a reaction to a message
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | Channel containing the message | |
| emoji | Yes | Emoji to react with (Unicode or custom emoji ID) | |
| message_id | Yes | Message to react to |
Input Schema (JSON Schema)
{
"properties": {
"channel_id": {
"description": "Channel containing the message",
"type": "string"
},
"emoji": {
"description": "Emoji to react with (Unicode or custom emoji ID)",
"type": "string"
},
"message_id": {
"description": "Message to react to",
"type": "string"
}
},
"required": [
"channel_id",
"message_id",
"emoji"
],
"type": "object"
}
Implementation Reference
- src/discord_mcp/server.py:205-226 (registration)Registration of the 'add_reaction' tool including its input schema definition in the list_tools() function.Tool( name="add_reaction", description="Add a reaction to a message", inputSchema={ "type": "object", "properties": { "channel_id": { "type": "string", "description": "Channel containing the message" }, "message_id": { "type": "string", "description": "Message to react to" }, "emoji": { "type": "string", "description": "Emoji to react with (Unicode or custom emoji ID)" } }, "required": ["channel_id", "message_id", "emoji"] } ),
- src/discord_mcp/server.py:566-573 (handler)The handler logic in call_tool() that executes the add_reaction tool: fetches channel and message, adds the specified emoji reaction, and returns a confirmation.elif name == "add_reaction": channel = await discord_client.fetch_channel(int(arguments["channel_id"])) message = await channel.fetch_message(int(arguments["message_id"])) await message.add_reaction(arguments["emoji"]) return [TextContent( type="text", text=f"Added reaction {arguments['emoji']} to message" )]