Delete messages permanently
mailbox_delete_messagesPermanently deletes matching messages in a mailbox.org folder with no Trash recovery, requiring confirm=true. Use it to empty Trash or Junk, or purge messages selected by a Gmail-style query or UIDs.
Instructions
PERMANENTLY delete messages (no Trash, cannot be undone except from mailbox.org backups). Prefer mailbox_move_messages to='trash'. Typical use: emptying Trash or Junk with query '' in that folder. Requires confirm=true.
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": {
"confirm": "<confirm>"
},
"name": "mailbox_delete_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 |
| confirm | Yes | Must be true: confirms permanent deletion | |
| dry_run | No | true = only report what would change |