Skip to main content
Glama

search_threads

Read-onlyIdempotent

Find or list chat threads/conversations — by topic, participant, unread/unanswered status, or recency. Omit query to list threads by filter. For message content use search.messages; for files use search.files. since filters by recency and pairs with only_unread / only_unanswered. Each thread names the LINE it speaks from (account: id, channel, name, phone) and whether the owner ever really wrote there (has_real_outgoing; imported history does not count). The same person can appear once per connected number — pick the thread by account, not by title, before you messages.send.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum threads to return.
queryNoTopic/keyword to search threads for. OMIT to list threads by filter.
sinceNoISO date (YYYY-MM-DD). Only threads with any message activity since this date (recency filter, not 'unanswered'). OMIT to skip.
offsetNoNumber of threads to skip (for pagination, default: 0)
only_unreadNoLimit to threads with unread messages. OMIT to include read threads.
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.
only_unansweredNoLimit to threads where the last message is incoming (you haven't replied). Covers 'threads I haven't replied to'. OMIT to include answered threads too.
participant_nameNoFilter to threads with this participant/contact. OMIT to include everyone (do NOT pass an empty string).
include_last_messagesNoWith only_unanswered: inline the most recent N messages (0-2) per thread so one call is enough to draft replies. Text truncated to 150 chars; full body via messages.read_history.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added
  3. Removed
  4. Changed1 schema field changed
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Number of threads to skip (for pagination, default: 0)",
      +  "minimum": 0,
      +  "type": "integer"
      +}
  5. Changed1 schema field changed
    • addedInput schema / properties / include_last_messages
      Added value: +{
      +  "description": "With only_unanswered: inline the most recent N messages (0-2) per thread so one call is enough to draft replies. Text truncated to 150 chars; full body via messages.read_history.",
      +  "maximum": 2,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  6. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds real behavioral context: the `since`+filter pairing, that each thread carries an `account` (id, channel, name, phone), the meaning of `has_real_outgoing` (imported history excluded), and the warning that one person recurs once per number so selection must be by account.

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

Conciseness5/5

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

Front-loaded purpose sentence, then routing, then semantics, then a final selection warning. Dense but every clause carries distinct information with no filler.

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

Completeness5/5

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

For a 9-param read-only list tool with no output schema, the description supplies both the routing guidance and the return-shape essentials (account fields, has_real_outgoing). Nothing an agent needs to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema lacks: `since` pairs with only_unread/only_unanswered and is a recency filter, not 'unanswered', and omitting `query` switches from search to list.

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 a specific verb+resource ('Find or list chat threads/conversations') and enumerates the axes it searches by (topic, participant, unread/unanswered, recency). It cleanly disambiguates from siblings by naming search.messages, search.files, and messages.send as the tools for adjacent tasks.

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 explicit routing: use search.messages for content, search.files for files, and omit `query` to list rather than search. It also sequences the tool before messages.send, telling the agent when to reach for it in a workflow.

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.