Delete Email
email_deleteDelete emails from a mailbox by ID, batch, or search query. Messages go to Trash unless permanent is true, which removes them irreversibly.
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. search_and_delete is bounded by limit: check has_more before reporting a mailbox fully swept. 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. | |
| 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, up to limit; the result's has_more says whether matches were left behind. | |
| 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 from inbox_list. Optional when the key has one inbox; pass this or `inbox`, not both. | |
| 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. Duplicates are removed, first occurrence kept, so succeeded counts distinct messages. | |
| has_attachment | No | true = only messages with an attachment. Ignored on generic IMAP. | |
| idempotency_key | No | Reuse only when retrying the identical request within 24 hours; the retry is collapsed, not repeated. Reuse with different arguments is rejected. | |
| include_folders | No | Folder names to search. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Server notes about how this call was handled — for example an argument that was not applied because the selected action does not accept it. Written by MCP Emails, not taken from any message, and absent when there is nothing to report. | |
| failed | No | ||
| has_more | No | True when messages matching the query were left UNTOUCHED because of the limit. Check this before reporting the sweep complete: re-run until it is false. | |
| inbox_id | No | ||
| operation | No | ||
| succeeded | No |