email_create_block_rule
Create a standing block rule to intercept future matching emails before they reach the inbox, using sender, subject, or header patterns and choosing delete or junk.
Instructions
Create a standing rule that intercepts future mail matching a pattern, before it reaches the inbox. Use headerContains (e.g. matching a Reply-To domain) to block a spam template family whose visible "From" domain rotates — matching the rotating domain directly stops working within days. Not supported on iCloud/generic IMAP (no standard server-side rule mechanism exists across IMAP servers). Outlook requires the MailboxSettings.ReadWrite scope — accounts authenticated before this tool existed need to re-run the setup wizard once to re-consent.
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": {
"accountId": "<accountId>",
"matchType": "<matchType>",
"value": "<value>",
"action": "<action>"
},
"name": "email_create_block_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The domain, address, or text to match | |
| action | Yes | delete: discard on arrival. moveToJunk: on Outlook, files straight to the Junk Email folder; on Gmail, skips the inbox (archives) — Gmail's filter API cannot proactively apply the SPAM label, only its own classifier can, so this is the closest a standing rule can actually do there. | |
| accountId | Yes | ||
| matchType | Yes | senderDomain/senderAddress: match the From address. subjectContains: match the subject. headerContains: match any header's raw content — the right choice for a stable element (e.g. a Reply-To domain) when the From domain rotates. |