move_email
Transfer emails between mailboxes to organize your inbox by moving selected messages to specified folders.
Instructions
Move 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:655-663 (handler)The actual implementation of the move_email tool which interacts with the IMAP client.
def move_email( self, uids: list[int], destination: str, mailbox: Optional[str] = None ) -> bool: """Move emails to another mailbox.""" self._ensure_connected() if mailbox: self.select_mailbox(mailbox) self.client.move(uids, destination) return True - src/imap_mcp/server.py:285-298 (registration)Tool registration and schema definition for move_email.
make_tool( "move_email", "Move emails to another mailbox", { "uids": { "type": "array", "items": {"type": "number"}, "description": "Email UIDs", }, "destination": {"type": "string", "description": "Destination mailbox"}, "mailbox": {"type": "string", "description": "Source mailbox (default: current)"}, }, ["uids", "destination"], ), - src/imap_mcp/server.py:608-613 (handler)Tool dispatch logic that calls the move_email handler.
elif name == "move_email": return imap_client.move_email( uids=args["uids"], destination=args["destination"], mailbox=args.get("mailbox"), )