mark_read
Mark email messages as read in your inbox or specified folders to manage unread email counts and organize your mailbox effectively.
Instructions
Mark email as read (seen)
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:159-178 (handler)The core implementation of the mark_read functionality, which adds the \\Seen flag to email UIDs.
def mark_read(self, folder: str, uids: int | list[int]) -> bool: """ Mark emails as read (seen). Args: folder: Folder containing the emails uids: Email UID or list of UIDs Returns: True if successful Raises: EmailFlagsError: If operation fails Example: >>> flags = EmailFlags(conn) >>> flags.mark_read('INBOX', [1, 2, 3]) True """ return self._store_flags(folder, uids, "+FLAGS", self.FLAG_SEEN) - src/mail_mcp/tools/__init__.py:124-141 (registration)Registration of the 'mark_read' MCP tool with its input schema.
Tool( name="mark_read", description="Mark email as read (seen)", inputSchema={ "type": "object", "properties": { "folder": { "type": "string", "description": "Folder containing the email (default: INBOX)", "default": "INBOX", }, "message_id": { "type": "string", "description": "Message ID (sequence number)", }, "uid": { "type": "string", "description": "Unique ID of the message",