Skip to main content
Glama

Search threads

threads_search
Read-onlyIdempotent

Search 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

NameRequiredDescriptionDefault
qYesMatched with typo tolerance against profile display names and usernames, the contact's name and the activity preview.
tagNoThreads whose contact has one of these tags. Repeat the key to match any of several.
viewNoA 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.
limitNoHow many best matches to return, from 1 to 50. Defaults to 25.
expandNoRelated resources to embed next to their ID field, one path per key, at most 4.
folderNoDefaults 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`.
statusNoThreads whose contact has one of these statuses. Repeat the key to match any of several.
unreadNo`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`.
platformNoRepeat the key to match any of several.
contactIdNoThreads with these contacts. With `accountLinkId`, finds the thread between an account and a contact. Repeat the key to match any of several.
assigneeIdNoThreads 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.
campaignIdNoThreads 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.
unassignedNo`true` keeps threads with no assignee, including through their contact. Not combinable with `assigneeId`.
accountLinkIdNoThreads of these account links. Repeat the key to match any of several.
awaitingReplyNo`true` keeps threads whose latest activity is inbound, the inbox's No reply.
includeArchivedNo`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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $defs / Platform / description
      Previous value: -"The platform. Every team can use twitter, linkedin, whatsapp; a team may have others enabled."New value: +"The platform. Every team can use twitter, linkedin, whatsapp, telegram; a team may have others enabled."
    • changedInput schema / $defs / Platform / examples
      Previous value: -[
      -  "twitter",
      -  "linkedin",
      -  "whatsapp"
      -]New value: +[
      +  "twitter",
      +  "linkedin",
      +  "whatsapp",
      +  "telegram"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / folder / description
      Previous value: -"Defaults to `inbox`, threads that are neither archived nor requests. `noReply` is `inbox` with `awaitingReply=true`. `requests` holds unarchived threads where `isRequest` is true. `archived` includes requests. `all` spans every folder. Every other filter narrows the folder, except `includeArchived`. Each folder is also a view: `inbox`, `awaitingReply` for `noReply`, `requests`, `archived` and `all`."New value: +"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`."
  3. Changed6 schema fields changed
    • addedInput schema / properties / awaitingReply
      Added value: +{
      +  "description": "`true` keeps threads whose latest activity is inbound, the inbox's No reply.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / campaignId / description
      Previous value: -"Threads these campaigns sent a message in. Campaign sends archive the thread, so pair it with `folder=archived` or `all`. Repeat the key to match any of several."New value: +"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."
    • changedInput schema / properties / folder / description
      Previous value: -"Defaults to `inbox`, threads that are neither archived nor requests. `noReply` is the `inbox` threads whose latest activity is inbound. `requests` holds unarchived threads where `isRequest` is true. `archived` includes requests. `all` spans every folder. Every other filter narrows the folder. Each folder is also a view: `inbox`, `awaitingReply` for `noReply`, `requests`, `archived` and `all`."New value: +"Defaults to `inbox`, threads that are neither archived nor requests. `noReply` is `inbox` with `awaitingReply=true`. `requests` holds unarchived threads where `isRequest` is true. `archived` includes requests. `all` spans every folder. Every other filter narrows the folder, except `includeArchived`. Each folder is also a view: `inbox`, `awaitingReply` for `noReply`, `requests`, `archived` and `all`."
    • addedInput schema / properties / includeArchived
      Added value: +{
      +  "description": "`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.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / unread
      Added value: +{
      +  "description": "`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`.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / view / description
      Previous value: -"A view's `id` from List views: lists the threads that view lists, in place of `folder`. Every other filter narrows it. A cursor issued for a saved view is `invalidCursor` once the view changes."New value: +"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."
  4. Added

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and non-destructive, so safety is covered. The description adds real behavioral context beyond them: relevance ordering and the fact that results come back in a single page with no cursor. It stops short of describing the match scope (which names/fields are searched) or what a match record contains, which matters given there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the ranking and single-page constraint before the sibling hand-off. The only waste is the leading line repeating the tool title verbatim, which adds no information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 16 parameters and no output schema, but the schema itself is exhaustively documented and the annotations cover the safety profile, so the description only needed to cover search-specific behavior. It does that (ranking, one page, versus paginated listing) and leaves the many filters to the schema, which handles them well. Returned fields remain unstated, a small gap given no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% across all 16 parameters, so the schema already carries the syntax and filter semantics (folder scoping, tag/status matching, includeArchived interactions). The description only restates that `q` matches a person's name or username, which duplicates the schema's own explanation of typo-tolerant matching against display names and usernames. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States the specific verb+resource (search threads) and immediately qualifies the semantics: results ranked by relevance to `q`, returned as a single page. It also names the sibling it is not (List threads), so an agent can pick between them without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit use case (find a conversation by a person's name or username) and an explicit alternative with the condition that selects it (page through the best 1,000 matches in inbox order via `q` on List threads). The when/when-not pair is fully spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources