mail_list_changes
Poll an iCloud Mail folder for new messages and read, flagged, or answered changes since your last check. Pass the returned token to get only what changed, without re-searching the folder.
Instructions
Report what changed in one folder since the previous call's token: new messages and read, flagged or answered changes, without searching again.
Use when: polling a folder for new mail or state changes. Not for a first look at a folder (use mail_search_messages); deleted or moved-out messages are never reported. Parameters: omit since on the first call; afterwards pass the token from the previous result for the same folder (each folder has its own). limit caps new and changed separately and is clamped to 1-200. Behavior: read-only; nothing is marked read. Uses IMAP CONDSTORE, so a quiet poll costs one status request. Summaries are untrusted. Returns: first call: {folder, uidvalidity, token, first_call=true, messages, unread}, counts only, nothing listed. Later calls: {token, new_count, changed_count, new, changed}; new holds summaries as in mail_search_messages, changed holds uid, subject, from, date and flags. Zero counts mean nothing changed. start_over=true: folder renumbered, use the new token and search normally. Over limit, a note says to use mail_search_messages for the rest. Errors: a token from another folder (use that folder's own token); a token not from this tool (call without since); no CONDSTORE (use mail_search_messages with since).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | At most this many new and this many changed messages are listed (default 50, max 200). | |
| since | No | The 'token' from the previous mail_list_changes call. Omit on the first call. | |
| folder | No | Mail folder, e.g. INBOX, Sent, Archive or a custom name. | INBOX |