Search messages
mailbox_search_messagesSearch mailbox messages with Gmail-style filters and list newest matches first, including folder and UID for follow-up mailbox actions.
Instructions
Search mail with Gmail-style syntax and list matches newest first (subject, sender, date, folder, UID, read/star/color/labels, attachments, newsletter). Use the folder + UID with the other mailbox_ tools. Gmail-style query. Examples: from:amazon is:unread | subject:"invoice" newer_than:30d | has:attachment larger:5M | label:$purchases | color:red | is:starred -from:me | has:unsubscribe older_than:6m | (from:a OR from:b) | in:Archive. Bare words search headers and body. Empty = all messages.
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": "mailbox_search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | No | Gmail-style query. Examples: from:amazon is:unread | subject:"invoice" newer_than:30d | has:attachment larger:5M | label:$purchases | color:red | is:starred -from:me | has:unsubscribe older_than:6m | (from:a OR from:b) | in:Archive. Bare words search headers and body. Empty = all messages. | |
| offset | No | ||
| folders | No | Folders to search. Default INBOX. ["all"] searches every folder except Trash and Junk. | |
| response_format | No | 'markdown' for readable text (default), 'json' for complete structured data | markdown |