get_emails
Fetch recent emails from INBOX and Junk without marking them read, or search the entire mailbox using server-side IMAP queries by sender, subject, date, or attachment.
Instructions
Fetch or search emails. Never marks mail read. Defaults to INBOX + Junk.
Two modes, reported by searched_window_only in the result:
No search terms: fast — the most-recent page*page_size per folder, served from an in-memory cache when warm.
searched_window_only=truehere, so an empty result means 'not in the recent window', not 'doesn't exist'.fresh=trueforces a live read past the cache.Search (
query,from_address,subject,since=YYYY-MM-DD,has_attachment, or rawfilters.criteria): runs SERVER-SIDE over the whole mailbox —queryis a full-text IMAP search, so matches outside the recent window are found.searched_window_only=false.
body=false omits message bodies (cheap headers + attachment metadata — ideal for
finding a message before opening it). cached=true keeps the 60-min result-set
cache for stable pagination. Each message includes uid/uidvalidity for robust
follow-up actions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | ||
| filters | No | ||
| query | No | ||
| folders | No | ||
| include_sent | No | ||
| strip_to_text | No | ||
| page | No | ||
| page_size | No | ||
| cached | No | ||
| body | No | ||
| from_address | No | ||
| subject | No | ||
| since | No | ||
| has_attachment | No | ||
| fresh | No |