Skip to main content
Glama
wowjinxy
by wowjinxy

add_reaction

Add emoji reactions to Discord messages by specifying channel, message ID, and emoji. This tool enables interactive responses in Discord conversations through MCP server integration.

Instructions

Add a reaction to a specific message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
message_idYes
emojiYes

Implementation Reference

  • The handler function that executes the add_reaction tool logic: fetches the channel and message, adds the specified emoji reaction, and returns a confirmation message.
    async def handle_add_reaction(discord_client, arguments: Dict[str, Any]) -> List[TextContent]:
        """Add a reaction to a message"""
        channel = await discord_client.fetch_channel(int(arguments["channel_id"]))
        message = await channel.fetch_message(int(arguments["message_id"]))
        
        emoji = arguments["emoji"]
        await message.add_reaction(emoji)
        
        return [TextContent(
            type="text",
            text=f"Added reaction {emoji} to message in #{channel.name}"
        )]
  • Defines the input schema, parameters, and description for the add_reaction tool in the MCP tool list.
        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"]
        }
    ),
  • Registers and dispatches the add_reaction tool by including it in the core_tool_names list and routing calls to CoreToolHandlers.handle_add_reaction.
    core_tool_names = [
        "get_server_info", "list_servers", "get_channels", "list_members",
        "get_user_info", "send_message", "read_messages", "add_reaction",
        "add_multiple_reactions", "remove_reaction", "moderate_message",
        "create_text_channel", "delete_channel", "add_role", "remove_role"
    ]
    
    if name in core_tool_names:
        handler_method = f"handle_{name}"
        if hasattr(CoreToolHandlers, handler_method):
            return await getattr(CoreToolHandlers, handler_method)(discord_client, arguments)

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

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