count_messages
Count messages matching live search criteria without fetching message data. Preview result counts before running a full search to save time and bandwidth.
Instructions
Count messages matching live IMAP search criteria without fetching message data. Use to preview how many results a search would return before running it. Prefer folder_stats for a simple unread/total count on one folder without filters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Filter by recipient address. | |
| from | No | Sender filter. | |
| label | No | Filter by folder label applied locally. | |
| query | No | Free-text filter. | |
| dateTo | No | Inclusive end date in ISO format. | |
| folder | No | Folder to count in. Defaults to INBOX. | |
| isRead | No | Read status filter. | |
| subject | No | Subject filter. | |
| dateFrom | No | Inclusive start date in ISO format. | |
| threadId | No | Filter by thread id, applied locally. | |
| isStarred | No | Starred status filter. | |
| sizeLarger | No | Only count messages larger than this size in bytes. | |
| sizeSmaller | No | Only count messages smaller than this size in bytes. | |
| senderDomain | No | Filter by sender domain, applied locally. | |
| hasAttachment | No | Filter by attachment presence. |