Move, archive, trash or report spam
mailbox_move_messagesMove multiple messages to any folder or to archive, trash, junk, or back to INBOX by UID list or Gmail-style query; preview large query selections with a dry run first.
Instructions
Move many messages: to any folder, or archive / trash / junk (spam) / not_junk (back to INBOX). Select by uids or a Gmail-style query. Use dry_run first for big query selections. Trash can be undone by moving back.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"to": "<to>"
},
"name": "mailbox_move_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Destination folder path, or one of: archive, trash, junk, not_junk, inbox | |
| max | No | Safety cap on how many messages a query may touch. The tool refuses when more match; raise it deliberately. | |
| uids | No | Exact message UIDs in `folder`. Give either uids or query. | |
| query | No | Select by query instead of UIDs (searches `folder` unless the query has in:...). Gmail-style query. Examples: from:amazon is:unread | subject:"invoice" newer_than:30d | has:attachment larger:5M | label:$purchases | color:red | is:starred -from:me | has:unsubscribe older_than:6m | (from:a OR from:b) | in:Archive. Bare words search headers and body. Empty = all messages. | |
| folder | No | Folder path, e.g. "INBOX", "Archive", "INBOX/newsletters". Names like archive, trash, junk, sent, drafts also work. | INBOX |
| dry_run | No | true = only report what would change | |
| mark_read | No | Also mark moved messages read (true) or unread (false) |