Search threads
threads_searchSearch threads
The threads that best match q, most relevant first, in one page. Use it to find a conversation by a person's name or username; to page through the best 1,000 matches in inbox order, use q on List threads.
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": {
"q": "<q>"
},
"name": "threads_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Matched with typo tolerance against profile display names and usernames, the contact's name and the activity preview. | |
| tag | No | Threads whose contact has one of these tags. Repeat the key to match any of several. | |
| view | No | A view's `id` from List views: lists the threads that view lists, in place of `folder`. Every other filter narrows it, except `includeArchived`. A cursor issued for a saved view is `invalidCursor` once the view changes. | |
| limit | No | How many best matches to return, from 1 to 50. Defaults to 25. | |
| expand | No | Related resources to embed next to their ID field, one path per key, at most 4. | |
| folder | No | Defaults to `inbox`, threads that are neither archived nor requests, leaving out conversations a platform keeps outside the inbox, such as chats with bots. `noReply` is `inbox` with `awaitingReply=true`. `requests` holds unarchived threads where `isRequest` is true. `archived` includes requests. `all` spans every thread, including chats kept out of the inbox. Every other filter narrows the folder, except `includeArchived`. Each folder is also a view: `inbox`, `awaitingReply` for `noReply`, `requests`, `archived` and `all`. | |
| status | No | Threads whose contact has one of these statuses. Repeat the key to match any of several. | |
| unread | No | `true` keeps threads unread for the agent's member, as `unread` shows them. A thread marked read moments ago may still be listed, with its current `unread`. Agents only: an API token has no member and gets `memberRequired`. | |
| platform | No | Repeat the key to match any of several. | |
| contactId | No | Threads with these contacts. With `accountLinkId`, finds the thread between an account and a contact. Repeat the key to match any of several. | |
| assigneeId | No | Threads whose `assigneeId`, the thread's own assignee or else its contact's, is one of these members. Repeat the key to match any of several. | |
| campaignId | No | Threads these campaigns sent a message in. Campaign sends archive the thread, so pair it with `folder=archived`, `folder=all` or `includeArchived=true`. Repeat the key to match any of several. | |
| unassigned | No | `true` keeps threads with no assignee, including through their contact. Not combinable with `assigneeId`. | |
| accountLinkId | No | Threads of these account links. Repeat the key to match any of several. | |
| awaitingReply | No | `true` keeps threads whose latest activity is inbound, the inbox's No reply. | |
| includeArchived | No | `true` adds the view's or folder's archived threads back, the inbox's With archived. A view that tests archived inside an any-of or a not-group keeps that test. No effect when the scope already includes archived threads. |