search_emails
Find emails in a local Outlook folder using literal text and filters like sender, date, or attachment. Returns metadata; reads bodies only when needed.
Instructions
Search one folder without recursion, newest received first. query is a literal substring, not Outlook AQS/OR/NOT syntax. Call directly for the default Inbox, with no mailbox/folder discovery prerequisite. Return metadata first, and read bodies only when the user's question requires them. Text matching is a case-insensitive substring in subject, body, or subject_body; sender matches the name or available SMTP address. All filters combine with AND. recipient matches available recipient names/SMTP addresses; attachment_name matches attachment filenames. category matches a complete category name; importance accepts low, normal or high. Text matching is case-insensitive. after is inclusive; before is exclusive. Dates accept YYYY-MM-DD at Windows local midnight or ISO 8601 with timezone. Body search reads bodies explicitly. Each call examines at most 1000 candidates for about 10 seconds; an external 30-second deadline protects against blocked Outlook. IMPORTANT: zero items with coverage.exhausted=false is an unfinished search, not proof that no email matches. Follow next_cursor with identical filters, optionally changing limit. Cursors are single-use, expire after 10 minutes, and are lost on worker restart. evaluation_complete also accounts for inaccessible candidates; results are best effort.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ||
| limit | No | ||
| query | No | ||
| before | No | ||
| cursor | No | ||
| sender | No | ||
| unread | No | ||
| category | No | ||
| query_in | No | subject | |
| store_id | No | ||
| folder_id | No | ||
| recipient | No | ||
| importance | No | ||
| attachment_name | No | ||
| has_attachments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| omitted | No | ||
| coverage | Yes | ||
| store_id | Yes | ||
| warnings | No | ||
| folder_id | Yes | ||
| next_cursor | Yes |