message-search
Search Gmail messages with structured filters for sender, recipient, subject, date, labels, and more. Select specific fields to retrieve tailored results.
Instructions
Search Gmail messages using structured query objects with flexible field selection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Structured query object or JSON string for filtering messages. Use query-syntax prompt for reference and rawGmailQuery for Gmail syntax. | |
| shape | No | Response shape: objects (keyed) or arrays (columnar, matching fields order) | objects |
| fields | No | Comma-separated fields to return. Omit for all fields. Available: id, threadId, subject, from, fromName, to, cc, bcc, date, snippet, body, isRead, isImportant, hasAttachments, attachmentCount, labelIds, folderName | |
| pageSize | No | Number of items per page (default: 50, max: 1000). Accepts numbers or numeric strings. | |
| pageToken | No | Token for retrieving the next page of results (gmail format). Omit for first page. | |
| contentType | No | Format for body content: text extracts plain text, html preserves HTML structure | text |
| excludeThreadHistory | No | When true, removes quoted thread history from body content |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |