search_messages
Find Gmail messages using Gmail search syntax; returns message and thread IDs for get_message or get_thread to retrieve content.
Instructions
Find messages with Gmail search syntax. Returns only {messages:[{id,threadId}],nextPageToken,resultSizeEstimate}, newest first, with no content: pass an id to get_message or a threadId to get_thread. messages is absent when nothing matches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Gmail search query, same syntax as the Gmail search box, e.g. "from:alice@example.com is:unread newer_than:7d". Empty string matches all mail except spam and trash. | |
| account | Yes | Account alias from list_accounts; selects which mailbox to use. | |
| pageToken | No | nextPageToken from a previous call with the same query, to fetch the next page. | |
| maxResults | No | Messages per page, 1-50. Default 20. |