Search Gmail threads
search_threadsSearch Gmail threads using standard Gmail search operators (e.g., from:x, is:unread). Returns thread IDs with snippets and metadata for matching threads.
Instructions
Search Gmail threads using Gmail's search syntax (e.g. from:x@y.com is:unread newer_than:7d, subject:invoice has:attachment). Returns thread IDs with a snippet and basic metadata for each matching thread.
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": {
"account": "<account>",
"query": "<query>"
},
"name": "search_threads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Gmail search query, using standard Gmail search operators. | |
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| pageToken | No | ||
| maxResults | No |