Search every mailbox
messages_list_all_mailboxesSearch every mailbox you have connected - every email account at once - in one call, or only those mailboxes names. The answer names the mailbox each result came from, names any mailbox it could not search, and is merged newest first by when each message arrived, a thread by its newest. A message whose recipients one answer cannot carry names the first that fit, omittedRecipients counting the rest. One search for what arrived after: the time of the last look is the cheapest way to watch for new mail. The times it answers with carry their offset in the person's own time zone, which the answer names under now beside their time now in it - UTC where the person has stored no zone, as now says.
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": "messages_list_all_mailboxes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | A Gmail mailbox, whatever its provider, reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ). An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. Any other mailbox whose provider is imap reads only from:, to: and cc: (never me), subject:, plain words and quoted phrases, -word or -"a phrase" leaving it out, is:unread, one run of OR between any of those (as a OR b OR c), has:attachment, and larger: and smaller: in bytes or as 500K or 5M, after: and before: as 2026/01/31, newer_than: in days, months or years, and one in: or label: naming one folder, by the name labels_list gives a label of type user or as inbox, sent, archive, drafts, spam or trash, a name holding a space quoted and a quote or backslash inside the quotes taking a backslash before it, with no AND or NOT, and is searched by message in every folder but the bin and junk. Every mailbox is asked these alike, in its own provider's language or applied to what it answers: from:, to: and cc: (never me), subject:, plain words and quoted phrases, OR between any of those (as a OR b OR c), -word or -"a phrase" leaving it out, is:unread, has:attachment, larger: in bytes or as 500K or 5M, in:trash or in:spam searching the bin or spam alone, and dates: after: and before: as 2026/01/31, read as midnight in the time zone answers name under now, or with an offset as 2026-01-31T09:00+01:00, and newer_than: as 7d, 2m or 1y, each mailbox answering only what arrived inside the period, with no AND, NOT, AROUND, NEAR or ONEAR in capitals. A password mailbox other than a Gmail reads one run of OR, and a query holding more leaves it out. Where the mailboxes read different languages - a Gmail reads Gmail's, whatever its provider - a query holding any other term is refused; where they read one, it is asked whole. Left out, every message is answered. | |
| by | No | message, the default, answers each matching message; thread answers each matching thread with every message in it. | |
| run | No | The name of a task you repeat, as on a schedule, of which this search is one run - 1 to 40 letters, digits and hyphens. Each mailbox is then read from ten minutes before its mark. The mark is the moment a run under this name began reading it, as runs_mark last saved it. A mailbox with no saved mark is read for the last 24 hours and ten minutes. The answer's asked field says where reading started in each mailbox. The search itself saves nothing and changes nothing in any mailbox. An answer that holds a mailbox's last page carries a runMark for it, save in the cases below. runs_mark takes that runMark and saves the mark in Multi Mail's own record, not in any mailbox. An answer that left out results to stay within its size counts them under omitted. Such an answer carries no runMark for any mailbox. The same search asked again with a smaller maxResults can carry one. The run itself sets the time each mailbox is read over, so q needs no dates. A period set by dates in q leaves a mailbox out of the runMark where it starts later or ends sooner than that time. Where q holds a term outside those every mailbox is asked alike, any date in q leaves every mailbox out of the runMark. A mailbox the search could not read keeps its earlier mark, and so does one with more pages. Pass nextPageToken with the same run to read on in that mailbox. | |
| view | No | summary, the default, carries each message's subject and snippet; headers leaves both out; compact, the lightest page, carries only each message's id, threadId, sender, date, unread mark, subject and the first 100 characters of its snippet. | |
| company | No | The company whose mailboxes alone are searched, as mailboxes_list names it, whatever its letter case; with mailboxes, only those of them filed under it. A run for one company needs a run name of its own, so each mailbox is read from the mark saved under that name. | |
| waiting | No | on_me answers only the threads waiting for the person's reply - their newest message someone else's, addressed to them; on_others only those waiting on another's - their newest message the person's own. Every mailbox is then read by thread, whatever by says, and each thread is answered with its newest message alone, drafts aside; one whose newest message reports a failed delivery carries bounced: true and waits on nobody. A thread is picked by who wrote last and to whom - on any other mailbox whose provider is imap, by its answered mark - never by what its message asks, which its words alone say. A page holds only what waits, so it can be short while more names a mailbox holding more. A Gmail, whatever its provider, and an Outlook mailbox answer both; any other mailbox whose provider is imap answers on_me by the mail no mail app marked answered and cannot answer on_others. | |
| mailboxes | No | The mailboxes to search, each by its name or email address; every one where none is named. | |
| pageToken | No | The nextPageToken of the answer before, asked with every other input the same: it searches on each mailbox it names from where that mailbox's page stopped, and no other. A thread can recur on a later page. | |
| maxResults | No | How many results to take from each mailbox, 5 where left out. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| now | Yes | The person's own time zone, in which every time this answer gives is written, and their time now in it. | |
| more | Yes | ||
| asked | Yes | Each mailbox searched, with what of the query its provider honoured itself and what was applied after. | |
| shown | Yes | ||
| omitted | No | ||
| runMark | No | Present under a run where this answer holds the last page of at least one mailbox and left out no results. Dates in q can leave a mailbox out of it, as the run input says. One runMark covers every such mailbox in the answer. Pass it to runs_mark with the run name and every runMark from the run's other pages, once the run's result is ready for the person. | |
| threads | No | ||
| messages | No | ||
| searched | Yes | ||
| unreadable | Yes | ||
| unreachable | Yes | ||
| nextPageToken | Yes | ||
| screeningWait | No | Present where a message is marked not_yet_screened: the seconds to wait before reading those messages by their ids. | |
| perMailboxMaxResults | Yes |