copy_email
Copy selected emails from one mailbox to another in IMAP accounts. Specify source emails by UID and destination mailbox to organize messages.
Instructions
Copy emails to another mailbox
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Email UIDs | |
| destination | Yes | Destination mailbox | |
| mailbox | No | Source mailbox (default: current) |
Implementation Reference
- src/imap_mcp/imap_client.py:665-673 (handler)The `copy_email` method in `imap_client.py` handles the logic for copying emails between IMAP mailboxes.
def copy_email( self, uids: list[int], destination: str, mailbox: Optional[str] = None ) -> bool: """Copy emails to another mailbox.""" self._ensure_connected() if mailbox: self.select_mailbox(mailbox) self.client.copy(uids, destination) return True - src/imap_mcp/server.py:614-619 (registration)The `copy_email` tool is registered and handled within the main server loop in `src/imap_mcp/server.py`.
elif name == "copy_email": return imap_client.copy_email( uids=args["uids"], destination=args["destination"], mailbox=args.get("mailbox"), )