Rescue emails from junk
not_junkTake messages back out of the junk folder and return them to the inbox - what "not spam" does in a mail client, and the reverse of mark_junk. THERE IS NO SOURCE FOLDER TO PASS: this always reads out of the junk folder, because that is the only place a message it can act on is. Get the uids from list_emails or search_emails against the junk folder first, and remember a uid only means something in the folder it came from. Pass to to send them somewhere other than the inbox - and refuses a to that is the junk folder itself, because that would put them straight back. REFUSES on a mailbox that has no junk folder rather than creating an empty one. Flags and the original dates are preserved, so a rescued message keeps the date it arrived rather than looking like it came in today. Pass every UID in one call rather than calling it once per message.
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": {
"uids": "<uids>"
},
"name": "not_junk"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Where to put them. Defaults to INBOX, which is what "not spam" means. | |
| uids | Yes | The UIDs to act on, from list_emails, search_emails or select_emails. Pass EVERY message you want changed in ONE call - this tool acts on the whole set in a single operation, and doing it that way costs the user one call instead of one per message. Up to 500 at a time. A single message is simply a one-element array. |