Archive a thread
threads_archiveTake one thread, or one message of it, out of the inbox: a Gmail mailbox, whatever its provider, takes its inbox label off, and an Outlook one moves it into its archive folder. It stays in the mailbox and in search. Any other mailbox whose provider is imap moves its inbox messages into its archive folder, made as Archive where it has none, each under a new id 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_archive"
}
}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. |