delete_messages
Delete email messages by moving them to the Trash mailbox. Requires message IDs; optionally specify account and source mailbox for faster processing.
Instructions
Delete messages (always moves to the account's Trash mailbox).
Destructive: gated behind user confirmation via MCP elicitation (issue #239), matching delete_rule / delete_mailbox / delete_template.
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": {
"message_ids": "<message_ids>"
},
"name": "delete_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Optional account name (or UUID) the messages live in. Must be provided together with `source_mailbox`. When both are given, the operation is much faster. | |
| permanent | No | Reserved; currently a no-op. Mail.app's AppleScript dictionary exposes no path to permanent-delete that bypasses Trash (issue #111). Passing True emits a DeprecationWarning; messages still go to Trash. Recoverable from the account's Trash mailbox until that mailbox is emptied. | |
| message_ids | Yes | List of message IDs to delete | |
| source_mailbox | No | Optional source mailbox name; see `account`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||