Delete message
delete_messageMove an email to Trash for safe removal, or permanently delete it with confirmation. Preview the action first with a dry run to check the sender, subject, and date.
Instructions
Delete an email message. By default moves to Trash for safety; set permanent=true together with confirm=true to permanently expunge. Pass dryRun: true to preview either (no confirm needed). Note: moving to Trash assigns a new UID in the Trash folder — the original UID is no longer valid. Proton removes the star (\Flagged) from messages moved to Trash (seen live); star them again after restoring if needed.
UID + folder pair caveat: IMAP UIDs are per-folder. Always pair a UID with the folder it came from; the same integer can refer to different messages in INBOX, Sent, Trash, and All Mail.
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": {
"uid": "<uid>"
},
"name": "delete_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Message UID (use list_messages or search_messages to find UIDs) | |
| dryRun | No | Preview what would happen, with the message's date, sender and subject, without changing anything. | |
| folder | No | Folder containing the message (default: INBOX) | INBOX |
| confirm | No | Required (true) together with `permanent: true`: a permanent delete can't be undone. Ignored for moves to Trash and dry runs. | |
| permanent | No | If true, permanently expunge the message instead of moving to Trash. Requires `confirm: true`. |