List emails in several accounts
list_emails_batchList or search emails in up to 20 accounts at once, with one result group per account. Filter with query, which takes typed search such as from:ann@example.com is:unread, and use folder for a folder role. Each account pages with its own pageToken.
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": {
"accounts": "<accounts>"
},
"name": "list_emails_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Typed search. Plain words search the message text; quote a phrase or a value that has spaces. Filters: from:, to:, subject:, in:inbox|sent|drafts|archive|spam|trash|all, is:read, is:unread, is:starred, is:unstarred, has:attachment, -has:attachment, after:YYYY-MM-DD (inclusive) and before:YYYY-MM-DD (exclusive), in UTC. Terms combine with AND; OR and parentheses are searched as text. | |
| folder | No | ||
| accounts | Yes | ||
| pageSize | No | Defaults to 25 | |
| includeSnippet | No | Request or suppress message previews | |
| includeSearchContext | No | Include a match-centered body excerpt; requires search words in query |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |