Move a thread to the trash
threads_trashMove one thread, or one message of it, to the trash - Gmail's bin, an Outlook mailbox's Deleted Items, the trash folder of a mailbox whose provider is imap - where it stays until threads_untrash brings it back or the provider's own retention ends it. A Gmail mailbox whose provider is imap keeps every label but the inbox on it and each message its id; in any other mailbox whose provider is imap each moved message takes a new id, which the answer names. With ids in place of id it takes 2 to 100 at once under one call's time, counted as one action: each thread it reached is answered under threads - done; notDone, saying why; or possiblyDone, moved in part or asked with no answer back, which threads_get - or messages_get for a message - reads to check - and each it did not reach, its time spent, its connection lost or the mailbox refusing it whole, is left untouched under notReached, for the same call again.
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": {
"mailbox": "<mailbox>"
},
"name": "threads_trash"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The threadId a search or a read answered, or with scope message the message's id. | |
| ids | No | 2 to 100 threadIds - or with scope message message ids - in place of id, acted on in one call. | |
| scope | No | thread, the default, acts on the whole thread; message acts on that one message alone. | |
| mailbox | Yes | The mailbox's name or its email address. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| threads | No | Each thread the call reached, with ids. | |
| labelIds | No | ||
| messages | No | ||
| newestOnly | No | The folders whose provider showed only their newest messages, each with how many it showed: every one holds more, and nothing before those was read, searched, counted or acted on, so finding nothing there says nothing of the rest. | |
| notReached | No | The ids the call did not reach - its time ran out, its connection to the mailbox was lost, or the mailbox refused it whole, as the thread that met the refusal says - each left untouched, for the same call again. |