Archive emails
archive_emailArchive messages - file them where this mailbox's own Archive button files them, out of the inbox but not deleted. USE THIS RATHER THAN move_email FOR ARCHIVING: the archive is a ROLE the mail server assigns to a folder, not a name, so it is "Archive" on Microsoft 365, it is All Mail on Gmail (where archiving means the message simply stops being in the inbox and keeps no other folder), and on many IMAP hosts it does not exist until something makes it. A folder merely NAMED "Archive" is not necessarily the one the mail client archives into, which is why move_email({to:"Archive"}) is the wrong tool here and can be refused on a mailbox whose folder list plainly shows one. IF THIS MAILBOX HAS NO ARCHIVE FOLDER, ONE IS CREATED, and subscribed so it shows up in Outlook and Roundcube; the reply says so - tell the user, because a new folder will appear in their mail client. REFUSES messages that are already in the archive, because there is nothing to do; use move_email if they want them somewhere else. All the messages must be in the SAME source folder. Flags and the original dates are preserved, so an archived backlog keeps the dates it arrived on and does not come back unread. Pass every UID in one call rather than calling it once per message. The reply names the folder actually used and the new uid of each message there, which is what you need to put any of them back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | The UIDs to act on, from list_emails or search_emails. Pass EVERY message you want changed in ONE call - this tool acts on the whole set in a single operation, and doing it that way costs the user one call instead of one per message. Up to 500 at a time. A single message is simply a one-element array. | |
| mailbox | No | The folder the messages are in now. Defaults to INBOX. |