remove_reaction
Remove a reaction from a WhatsApp message by specifying the recipient, message ID, and optional sender to manage message interactions.
Instructions
Remove a reaction from a message.
Args: to: Phone number or WhatsApp ID message_id: ID of message to remove reaction from sender: Optional sender phone ID
Returns: Dictionary with success status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| message_id | Yes | ||
| sender | No |
Implementation Reference
- tools/messaging.py:401-430 (handler)The remove_reaction tool handler - an async function decorated with @mcp.tool() that removes reactions from WhatsApp messages. It takes parameters 'to', 'message_id', and optional 'sender', calls wa_client.remove_reaction(), logs the action, and returns a success status dictionary.async def remove_reaction( to: str, message_id: str, *, sender: Optional[str] = None, ) -> dict: """ Remove a reaction from a message. Args: to: Phone number or WhatsApp ID message_id: ID of message to remove reaction from sender: Optional sender phone ID Returns: Dictionary with success status """ try: result = wa_client.remove_reaction( to=to, message_id=message_id, sender=sender, ) logger.info(f"Reaction removed from message {message_id}") result_data = str(result) if result else None return {"success": True, "result": result_data} except Exception as e: logger.error(f"Failed to remove reaction: {str(e)}") return {"success": False, "error": str(e)}