Find Emails
find_emailsSearch your entire mailbox by text or list emails in a folder, with pagination, filtering, and unread-only options.
Instructions
List emails in a folder, or search the whole mailbox by text.
Newest first. Bodies are not included — a row carries a short preview at
most; full body, attachment ids and links come from get_email.
A listing answers with total/has_more and both continuations, next_offset and next_cursor — take either for the next page. A search has neither a total (the server reports 0 whatever it found) nor a cursor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | next_cursor from the previous answer. Does not drift. Not combinable with offset, with query, or with limit=200. | |
| limit | No | ||
| query | No | full-text search over the OWA index — subject, body and sender, Exchange KQL (e.g. 'премия' or 'from:ivanov отчёт'). Finds old mail the web client finds. Omitted → plain folder listing. | |
| folder | No | well-known name, custom folder name, or FolderId. With `query`, search covers the whole mailbox unless you narrow it here. | inbox |
| offset | No | skip this many rows. Drifts when mail arrives during a walk. | |
| granularity | No | with `query` only. A thread row lists only the messages that matched, not the whole conversation — for that use get_thread. | threads |
| unread_only | No | filtered by the server on both routes, so it reaches the whole folder or index rather than the page in hand. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |