Delete Email
email_deleteDelete emails from an inbox individually, in batches, or by search criteria. Moves messages to Trash by default; use permanent to hard-delete them.
Instructions
Delete messages in one inbox. Flagged DESTRUCTIVE so your MCP client can ask for confirmation first. Deleted mail goes to Trash and stays recoverable unless you pass permanent: true, which is irreversible. Needs the delete:email scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Cc recipient to match: address, name, or fragment. | |
| to | No | To recipient to match: address, name, or fragment. | |
| body | No | Text to find in the body. On Gmail this matches the whole message. | |
| from | No | Sender to match: address, name, or fragment. | |
| text | No | Text to match anywhere, headers included. | |
| inbox | No | Inbox email address; an alternative to inbox_id, which wins when both are given. | |
| limit | No | Cap on messages deleted. Default 500. | |
| query | No | Provider-native raw query (escape hatch); prefer the structured fields. Ignored on Fastmail. | |
| since | No | Received on or after this date or datetime (no timezone = UTC). | |
| action | Yes | Operation to run. delete = one message_id; delete_batch = up to 500 message_ids; search_and_delete = every message matching a search. | |
| before | No | Received strictly before this date or datetime (no timezone = UTC). | |
| unread | No | true = unread only; false = read only; omit for both. | |
| flagged | No | true = only flagged/starred messages. Ignored on Outlook. | |
| subject | No | Text to match in the subject; phrases match as-is. | |
| inbox_id | No | Inbox UUID. Optional when the key has exactly one inbox. Otherwise pass this or `inbox`; omit both and the error lists every inbox_id. | |
| permanent | No | Hard-delete, bypassing Trash. Default false, which trashes it. | |
| message_id | No | Provider-native message id from a list or search. | |
| message_ids | No | Provider-native message ids to delete. | |
| has_attachment | No | true = only messages with an attachment. Ignored on generic IMAP. | |
| idempotency_key | No | Opaque key for one operation, outbound or mailbox mutation. Reuse it only when retrying the identical request within 24 hours: the retry is collapsed, not repeated, which matters most for copy. Reuse with different arguments is rejected; omit it for normal behaviour. | |
| include_folders | No | Folder names to search. |