search-emails
Search, list, or sync emails across folders with filters by sender, subject, date, or attachments. Use delta sync for incremental updates or group by conversation for threaded view.
Instructions
Search, list, delta-sync, or thread-group emails — six modes selected by parameters (read-only). With no params: lists recent emails in folder (default inbox). With query/from/to/subject/date filters: full search (combines via OData filter). With kqlQuery: raw Keyword Query Language for advanced server-side search. With deltaMode: true: returns current state plus a deltaToken; pass the token back on the next call for incremental changes only — ideal for inbox monitoring. With groupByConversation: true: returns conversation threads. With conversationId: returns all messages in a single thread. With internetMessageId: looks up a message by its RFC Message-ID header. Personal Outlook.com accounts have limited $search support — this tool falls back through OData filters / boolean filters / recent listing automatically, but structured filters (from/subject/receivedAfter/hasAttachments/unreadOnly) return cleaner results. Returns paged messages with id/subject/from/receivedDateTime/preview by default; use outputVerbosity to expand.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deltaMode | No | Enable delta sync mode. Returns only changes since last sync. Use deltaToken for subsequent calls. | |
| internetMessageId | No | Look up email by Message-ID header (e.g. <abc123@example.com>). For threading/deduplication. | |
| conversationId | No | Get all messages in a conversation thread by conversationId. | |
| groupByConversation | No | List conversations (threads) grouped by conversationId instead of individual emails. | |
| query | No | Search query text. Omit for list mode. | |
| kqlQuery | No | Raw KQL (Keyword Query Language) query for advanced search. Bypasses other search params. | |
| folder | No | Email folder (default: 'inbox') | |
| from | No | Filter by sender email/name | |
| to | No | Filter by recipient email/name | |
| subject | No | Filter by subject | |
| hasAttachments | No | Filter to emails with attachments | |
| unreadOnly | No | Filter to unread emails only | |
| receivedAfter | No | Filter emails received after date (ISO 8601) | |
| receivedBefore | No | Filter emails received before date (ISO 8601) | |
| searchAllFolders | No | Search across all mail folders | |
| count | No | Number of results (list default: 25, search default: 10, max: 50) | |
| outputVerbosity | No | Output detail level (default: standard) | |
| deltaToken | No | Token from previous delta call for incremental sync (deltaMode only) | |
| maxResults | No | Max results per page for delta sync (default: 100, max: 200) | |
| includeHeaders | No | Include email headers for each message (conversationId only) |