search_emails
Find Gmail messages using keywords and operators like from:, subject:, has:attachment, or date ranges; scans subject, body, sender, recipients, and attachment names.
Instructions
Search all Gmail mail using Gmail search syntax (keywords plus operators like from:, subject:, has:attachment, after:, newer_than:). Searches subject, body, sender, recipients, and attachment names.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_emails"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Gmail search query — same syntax as the Gmail search box. Plain keywords ("invoice acme") or operators: from:, to:, subject:, has:attachment, filename:pdf, is:unread, label:, after:2024/01/01, before:, newer_than:7d, larger:5M, "exact phrase", OR, -exclude. | |
| pageToken | No | Token from a previous response ("nextPageToken") to fetch the next page | |
| maxResults | No | Number of results to return (max 50) | |
| includeSpamTrash | No | Also search Spam and Trash. Default false. |