Search the whole mailbox on the provider, not just the synced window
search_mailboxSearches subject/from/body on the provider itself (Gmail search, IMAP SEARCH, or Graph $search), not just the already-synced window list_messages reads, so older mail the sync window has not reached yet (e.g. "the lease agreement from 2022") can still be found. Matches are pulled into the local store so get_message and list_messages can open them afterward; they stay available until they age out of their folder's window the normal way, the same as load_older_messages. Spam and Trash are never searched. Returns newest first, capped at limit (default 20, max 50). date is always ISO 8601, like every other tool. snippet is the provider's own preview when it has one, falling back to the subject only when nothing else exists.
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": {
"inboxId": "<inboxId>",
"query": "<query>"
},
"name": "search_mailbox"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results to return, clamped 1..50. Default 20. | |
| query | Yes | Words to search for in subject/sender/body, 1-200 characters. | |
| folder | No | Restrict to one of this inbox's selected folders (see list_folders). Omit to search the whole mailbox except Spam/Trash. | |
| inboxId | Yes |