list_threads
Retrieve and organize email threads in your Gmail mailbox using filters, labels, and pagination. Supports querying, label-based filtering, and including spam/trash results for efficient thread management.
Instructions
List threads in the user's mailbox
Input Schema
Name | Required | Description | Default |
---|---|---|---|
includeBodyHtml | No | Whether to include the parsed HTML in the return for each body, excluded by default because they can be excessively large | |
includeSpamTrash | No | Include threads from SPAM and TRASH in the results | |
labelIds | No | Only return threads with labels that match all of the specified label IDs | |
maxResults | No | Maximum number of threads to return | |
pageToken | No | Page token to retrieve a specific page of results | |
q | No | Only return threads matching the specified query |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"includeBodyHtml": {
"description": "Whether to include the parsed HTML in the return for each body, excluded by default because they can be excessively large",
"type": "boolean"
},
"includeSpamTrash": {
"description": "Include threads from SPAM and TRASH in the results",
"type": "boolean"
},
"labelIds": {
"description": "Only return threads with labels that match all of the specified label IDs",
"items": {
"type": "string"
},
"type": "array"
},
"maxResults": {
"description": "Maximum number of threads to return",
"type": "number"
},
"pageToken": {
"description": "Page token to retrieve a specific page of results",
"type": "string"
},
"q": {
"description": "Only return threads matching the specified query",
"type": "string"
}
},
"type": "object"
}