Search messages
search_messagesFind Outlook messages by text, sender, recipient, subject, date, category, read/flag state, or attachments. Filter across mail folders; results match names, subject, and preview text only.
Instructions
Find messages by text, sender, recipient, subject, date, category, read/flag state or attachments. Works by scanning the newest messages of each folder (scanLimit per folder) and matching subject, sender, recipient display names and the ~250-character preview; it does not search full bodies or attachment contents. All given criteria must match. Searches all mail folders except Deleted Items, Junk, Drafts and Outbox unless folders is given.
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": "search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Recipient display names contain this | |
| from | No | Sender name or address contains this | |
| text | No | Words that must all appear (subject, preview, sender or recipients); use "quotes" for phrases | |
| after | No | Only messages received at/after this date or time (ISO 8601) | |
| limit | No | Maximum results (default 25) | |
| before | No | Only messages received before this date or time (ISO 8601) | |
| unread | No | Only unread messages | |
| flagged | No | Only flagged messages | |
| folders | No | Folders to search (names, paths or IDs), or ["all"] | |
| subject | No | Subject contains this | |
| category | No | Only messages with this category | |
| scanLimit | No | Newest messages to scan per folder (default 1000) | |
| hasAttachments | No | Only messages with (true) or without (false) attachments |