mail_unjunk
Moves Junk copies of given message IDs back to the account's Inbox on IMAP servers, re-checking Message-ID and optional sender name before each move. Nothing is deleted or sent; dry_run previews.
Instructions
Move the Junk copies of messages (message_ids, e.g. from mail_find with mailboxes ['junk']) to that account's Inbox, on the server for IMAP accounts. Copies in any other mailbox are never touched; nothing is deleted, marked or sent. Each copy's Message-ID is re-checked before it moves, and with from_name_contains the sender's display name must still contain that text (any case) or the copy stays in Junk. Not destructive, so no confirm is needed; dry_run previews. A call stops starting new moves after ~35s and reports 'remaining'; run it again for the rest.
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": {
"message_ids": "<message_ids>"
},
"name": "mail_unjunk"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Required for deletes and multi-recipient sends; without it the call only previews | |
| dry_run | No | Preview only: report what would happen and change nothing (default false) | |
| message_ids | Yes | RFC822 Message-IDs (up to 500). Only their Junk copies move. | |
| from_name_contains | No | Optional guard: move a copy only if its sender's display name still contains this text (case-insensitive) |