Delete Email
email_deleteDelete 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: has_more: true means matches were left behind. Needs the delete:email scope.
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": {
"action": "<action>"
},
"name": "email_delete"
}
}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). Also takes "2026-06", "today", "7 days ago", "last month" or "30d". | |
| 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). Takes the same relative forms as `since`. | |
| unread | No | true = unread only; false = read only; omit for both. | |
| flagged | No | true = only flagged/starred messages. | |
| subject | No | Text to match in the subject, as written. Gmail (API or IMAP) and Outlook match WHOLE WORDS, so a partial word finds nothing; other IMAP servers substring-match. | |
| inbox_id | No | Inbox UUID (inbox_list). Optional with one inbox. | |
| 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 | Retry key: reuse only for the identical call within 24h; it runs once. | |
| include_folders | No | Folders to search, each a folder or label name or id from folder_list, or an alias (works where the mailbox has that role). IMAP covers INBOX only unless you name archive or sent folders; Gmail and Outlook search every folder except the trash (Deleted Items on Outlook; Gmail also skips Spam), so name it to include it. |
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 MCPEmails, 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; the sweep is complete only when it is false. | |
| inbox_id | No | ||
| operation | No | ||
| succeeded | No |