mark_unread
Mark specific emails as unread to highlight them for later review or follow-up in your IMAP email account.
Instructions
Mark emails as unread
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Email UIDs | |
| mailbox | No | Mailbox name (default: current) |
Implementation Reference
- src/imap_mcp/imap_client.py:627-633 (handler)The actual implementation of the mark_unread logic, which removes the \Seen flag from the given UIDs.
def mark_unread(self, uids: list[int], mailbox: Optional[str] = None) -> bool: """Mark emails as unread.""" self._ensure_connected() if mailbox: self.select_mailbox(mailbox) self.client.remove_flags(uids, [b"\\Seen"]) return True - src/imap_mcp/server.py:244-254 (registration)Tool definition/registration for "mark_unread" in the MCP server.
make_tool( "mark_unread", "Mark emails as unread", { "uids": { "type": "array", "items": {"type": "number"}, "description": "Email UIDs", }, "mailbox": {"type": "string", "description": "Mailbox name (default: current)"}, },