Search Gmail (read-only)
search_gmailFind messages in connected Gmail inboxes using Gmail search operators (from:, subject:, is:unread, newer_than:7d). Returns subject, sender, date, and snippet for each match.
Instructions
Search one of the authenticated user's connected Gmail inboxes (read-only). Reuses Integrations hub Gmail (service_connections provider=gmail). Optional account/email selects a mailbox when multiple are connected — call list_gmail_accounts first. Prefer Gmail operators: from:, subject:, is:unread, newer_than:7d, has:attachment. Returns id, subject, from, date, snippet only (no body). Follow up with read_gmail_message. Cannot send, archive, or delete. Never invent email contents. If Gmail is not connected, connect at /integrations. Requires API key or OAuth with scope context. Share tokens cannot call this tool. ($0.10; API key required)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Alias for query | |
| No | Alias for account | ||
| query | Yes | Gmail search query, e.g. "is:unread newer_than:7d", "from:airline subject:itinerary", "receipt newer_than:30d" | |
| account | No | Mailbox email, connection id, or Google subject (from list_gmail_accounts) | |
| max_results | No | Max messages to return (default 10, max 20) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| account | No | ||
| messages | Yes | ||
| result_size_estimate | Yes |