mark_flagged
Mark email messages as flagged or starred to highlight important communications for easy identification and follow-up in your email management workflow.
Instructions
Mark email as flagged (starred)
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:196-210 (handler)The actual implementation of the mark_flagged tool logic which calls _store_flags.
def mark_flagged(self, folder: str, uids: int | list[int]) -> bool: """ Mark emails as flagged/starred. 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_FLAGGED) - src/mail_mcp/__main__.py:83-93 (registration)The registration of the mark_flagged tool with its schema definition in __main__.py.
name="mark_flagged", description="添加星标", inputSchema={ "type": "object", "properties": { "folder": {"type": "string", "default": "INBOX"}, "uid": {"type": "integer", "description": "邮件 UID"}, }, "required": ["uid"], }, ),