search_threads
Search Gmail conversations by query and labels, returning thread summaries without message bodies; use get_thread to read a specific thread.
Instructions
Search conversations (threads). Returns one row per thread: subject, snippet, participants, message count, last date, label IDs and message IDs, without bodies. Use get_thread to read one. Drafts-only threads are excluded unless the query mentions drafts. An empty list means nothing matched.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_threads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | No | "minimal" (default): thread summary. "metadata": summary without subject or snippet. "messages": also list each message's headers. | |
| query | No | Gmail search syntax, exactly as in the Gmail search box. Operators: from:, to:, cc:, bcc:, subject:, label:NAME, in:(inbox|sent|drafts|trash|spam|anywhere|archive), is:(unread|read|starred|important), has:attachment, filename:pdf, after:YYYY/MM/DD, before:YYYY/MM/DD, newer_than:7d, older_than:1y, larger:10M, "exact phrase", OR, -negation, ( ) grouping, {a b} for OR. Whitespace is AND. Keep queries keyword-based rather than pasting whole subjects. | |
| labelIds | No | Restrict to threads carrying all of these label IDs. | |
| pageToken | No | nextPageToken from a previous call, to fetch the next page. | |
| maxResults | No | Threads per page. Default 20. | |
| includeSpamTrash | No | Include Spam and Trash. Default false. |