Search threads
cooper_search_threadsUse this when you need the conversations that contain a keyword, sender, recipient, or subject, instead of each matching message. Read-only; requires auth. Inputs: inbox_id (required; inbox id, username, or email), q (required; every word must match subject, body text, from, or to), limit (optional, default 20, max 50). Returns {object:"list", inbox_id, q, data:[thread]} ordered by the best matching message. Each thread includes folder and purge_after. Omit folder to search inbox and archive only. An empty q returns HTTP 400 missing_query. A bad folder returns invalid_folder. An unknown inbox returns inbox_not_found.
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": {
"inbox_id": "<inbox_id>",
"q": "<q>"
},
"name": "cooper_search_threads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Search words; every word must match subject, body, from, or to | |
| limit | No | Max threads to return (default 20, max 50) | |
| folder | No | inbox, archive, spam, trash, or all. Omit to search inbox and archive only. A bad value returns invalid_folder. | |
| inbox_id | Yes | Inbox id (inb_…), username, or full email address |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | The search query that was run. | |
| data | No | Items on this page, in the order the tool description gives. | |
| object | No | Object type name, such as list, message, or thread. | |
| inbox_id | No | Inbox id (inb_…) this object belongs to. Null when it applies to every inbox. |