Search Gmail messages
search_gmail_messagesSearch a mailbox using Gmail's own query syntax and return message metadata (id, subject, sender, date, snippet, labels) — not full bodies. Use this to find messages, then get_gmail_message to read one, or apply_gmail_labels to file them. Query examples: 'from:acme.com', 'has:attachment newer_than:7d', 'subject:invoice is:unread'.
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": {
"mailbox": "<mailbox>"
},
"name": "search_gmail_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default 20, cap 100) | |
| query | No | Gmail search query, same syntax as the Gmail search box | |
| mailbox | Yes | Email address of the connected Gmail/Google Workspace mailbox to act on. Call list_authorized_mailboxes to see available options. | |
| labelIds | No | Restrict to these label IDs |