Archive messages
archive_messagesArchives the person's messages (moves them out of the inbox, nothing is deleted). Messages the person picked: pass each row's inboxId and messageId from show_inbox (the id block at the end of its text, or structuredContent.rows), usually by row number ("archive 2 and 5"). Or pass sender { inboxId, email } to act on that sender's mail still in the inbox, like "archive everything from 2" after review_unsubscribes (up to 50 newest per call). Prefer this over trash. For more than 5 messages, a call without confirmed:true changes nothing and returns { needsConfirmation: true, count, bySender, sayToHuman }: show sayToHuman, then call again with the same items/sender and confirmed:true once the human agrees. More than 25 messages is a preview first: nothing moves and you get { preview: true, count, topSenders, samples, confirmToken }; ask the person, then call again with the same arguments plus confirmToken. Past 500 messages moved in an hour the person is asked directly, or you get { needsApproval: true, approvalUrl }: give them the link and do not split the move into smaller calls. Mail from a VIP is skipped when you act on several messages. Act on a VIP's message alone, and only after the person agrees: in apps that can prompt the person, they are asked directly; otherwise ask in chat and pass vipConfirmed:true. Reporting spam is not done here: it goes through propose_mark_spam then confirm_mark_spam, one message at a time. Work on your own only on a clear instruction or a saved agentRules rule; otherwise suggest and wait. The result has an undoId for undo_view_action, which works once, for 7 days; report counts and the undoId.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "archive_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | ||
| sender | No | Instead of items: every message from this sender still in the inbox | |
| confirmed | No | More than 5 messages: true once the person agreed to the count/sender breakdown a first call without it returned. Not needed for 5 or fewer. | |
| confirmToken | No | More than 25 messages: the confirmToken a first call returned in its preview, after the person agreed. Single use, 15 minutes. | |
| vipConfirmed | No | true only after the person agreed in chat to act on this one VIP message |