move_mail
Move messages to archive, trash, inbox, junk, or named mailboxes; preview destinations first, run batch plans, and undo any change with the returned token.
Instructions
Move messages to archive, trash, inbox, junk or a named mailbox; or, with plan, several groups to several places at once; preview: true shows what would go where first. Never deletes permanently; returns an undo_token. For an account without an archive mailbox, Mail is asked to make one; if it will not, the result says how. Gmail: Mail can only move messages to the trash or junk by script (and out of them, to All Mail); other Gmail moves are refused with what to do instead.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "move_mail"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Destination: archive, trash, inbox or junk (each message's own account), or a mailbox name or path from list_mailboxes. | |
| ids | No | Message ids (1-200). | |
| plan | No | Instead of ids and to: several moves at once, each its ids and destination (up to 500 messages in all); one undo takes them all back. | |
| account | No | Account of the destination mailbox, when its name exists in several accounts. | |
| preview | No | true: say what would go where, and move nothing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| done | Yes | ||
| note | No | ||
| failed | No | ||
| planned | No | With preview: what would go where. | |
| undo_token | No |