mark_unread
Mark email as unread to remove the seen flag and maintain message visibility in your inbox.
Instructions
Mark email as unread (remove seen flag)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Folder containing the email (default: INBOX) | INBOX |
| message_id | No | Message ID (sequence number) | |
| uid | No | Unique ID of the message |
Implementation Reference
- src/mail_mcp/operations/flags.py:180-194 (handler)The actual implementation of mark_unread logic in the EmailFlags class which interacts with the IMAP connection.
def mark_unread(self, folder: str, uids: int | list[int]) -> bool: """ Mark emails as unread (remove \\Seen flag). Args: folder: Folder containing the emails uids: Email UID or list of UIDs Returns: True if successful Raises: EmailFlagsError: If operation fails """ return self._store_flags(folder, uids, "-FLAGS", self.FLAG_SEEN)