Search and list threads
list_threadsSearch Gmail conversations using query or label filters, returning thread IDs and latest-message snippets for triaging an inbox or finding a discussion to join.
Instructions
Searches conversations (threads) with the same Gmail query syntax as list_messages and returns id, snippet (of the latest message) and historyId per thread. Use this instead of list_messages when the unit of work is a conversation — triaging an inbox, finding a discussion to reply into. Filter with query and/or label_ids; paginate with page_token from nextPageToken (page_size max 500). Read the full conversation with get_thread.
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": "list_threads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Gmail query syntax, e.g. "from:amy@example.com is:unread newer_than:7d has:attachment subject:invoice". Same operators as the Gmail search box. | |
| label_ids | No | Only threads carrying ALL of these label ids (see list_labels). | |
| page_size | No | Threads per page (1..500, API default 100). | |
| page_token | No | nextPageToken from the previous page. | |
| include_spam_trash | No | Also search SPAM and TRASH (default false). |