Skip to main content
Glama

find_threads

Read-onlyIdempotent

Search workspace threads by task attributes or relation references, using equality filters and keyset pagination, to locate matching work items you can read.

Instructions

Find a workspace's threads by their task attributes: equality filters over kind, engine, threat_model, size, linear_issue, repo, tier, lane and review_family, given as attr (attr.linear_issue=ENG-123 style pairs), plus engine, tier and lane as bare shorthand, and ref (ref.twin_of= style: relation wire name to thread id) for threads holding that reference to that thread; a thread outside your workspace matches nothing (an unused relation is an empty result too). Combined with AND. A thread with no stored attributes matches the defaults it reads with (kind=change, threat_model=false); the other fields match only a stored value. Scoped to your own workspace (workspace_id omitted, the same; a foreign one is refused) and to threads you may read. Keyset-paginated like list_threads (limit, cursor, order; a cursor that is not a thread you can read in your workspace is refused); returned threads carry their attributes. The twin of GET /workspaces/{id}/threads.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_threads"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoReference filters by relation wire name (twin_of, duplicates, supersedes, ...): keeps the threads holding that reference to the given thread id.
attrNoAttribute equality filters by field name: kind, engine, threat_model, size, linear_issue, repo, tier, lane, review_family. Values are the fields' wire forms.
laneNoOnly threads in this service lane (batch or flex); shorthand for attr.lane.
tierNoOnly threads carrying this review tier (A or B); shorthand for attr.tier.
limitNoMax threads to return (clamped 1..=500).
orderNoDirection of the keyset walk (default oldest).
cursorNoExclusive keyset cursor: the prior page's last thread id.
engineNoOnly threads routed to this engine (unattended, session or human); shorthand for attr.engine.
workspace_idNoyour own workspace (whoami's workspace_id); omitted, the same

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv479.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Well beyond the readOnly/idempotent annotations, it discloses default-matching semantics ('kind=change, threat_model=false' match when nothing is stored), the empty-result behavior for unused relations, the refusal of a cursor that is not a readable thread in your workspace, and that returned threads carry their attributes. These are exactly the non-obvious behaviors an agent would otherwise get wrong.

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

Conciseness3/5

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

It is a single dense run-on sentence stitched together with semicolons and parentheses, so the useful matching and scoping rules are hard to scan. Front-loading the purpose is good, but the packaging costs readability on a definition with nine parameters.

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?

For a nine-parameter, nested-object search tool with no output schema, it covers matching rules, scoping, refusal conditions, pagination, and a hint at the return ('returned threads carry their attributes'). Only the response shape and page-size behavior are left thin, which is minor given the schema's own documentation.

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 real meaning: the 'attr.linear_issue=ENG-123' pair syntax, the 'ref.twin_of=<thread id>' wire-name-to-id convention, and the fact that engine/tier/lane are bare shorthands for the corresponding attr keys. It does not explain limit clamping or cursor exclusivity beyond what the schema already says.

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?

The description opens with a specific verb and resource ('Find a workspace's threads by their task attributes') and enumerates exactly which fields can be filtered, which cleanly separates it from the unfiltered list_threads sibling and the singular find_thread. An agent can decide between them from this sentence alone.

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

Usage Guidelines4/5

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

It establishes clear applicability context: filters combine with AND, a foreign workspace_id is refused, and only threads you may read are returned. It does not, however, explicitly say when to prefer this over list_threads or find_thread, so alternative routing is left implicit rather than stated.

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

Deploy Server

Other Tools