Skip to main content
Glama

close_thread

Closes a Worktrail thread as resolved, releases every bound worktree, and records a one-sentence result for the Status screen and retrospective.

Instructions

Close a thread (status resolved) and release every worktree bound to it. result = one sentence saying what came of it — it becomes the thread's closing line in Worktrail's Status screen and the retrospective. Also fills the result line of a thread the engineer already closed from the screen (needs_result in list_threads) — appended as a new ledger event, never an edit. Closed threads stay searchable; reopen from the screen or via set_status, then switch_thread to it. FIRST LINE = TITLE: at most 120 columns (CJK counts as 2), no ' — ' joiner, and no record numbers (#517, D15635, 확장 122호, turn 80, commit hashes) — a person reads that line on the screen; put the rest after a blank line as the body. The paragraph right under the title is read on the screen too, so no record numbers there either; they go in a later paragraph or evidence_ids (the server refuses otherwise).

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": {
      "case_id": "<case_id>"
    },
    "name": "close_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
resultNo
case_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the resolved status, worktree release, that result becomes the closing line in the Status screen and retrospective, that it is appended as a new ledger event and never an edit, and that closed threads stay searchable. It also warns that the server refuses record numbers in the title or first paragraph, which is a concrete enforcement behavior an agent cannot infer elsewhere.

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?

The core action and side effect are front-loaded in the first clause, followed by return semantics and then the formatting rules. Although lengthy, every sentence carries a distinct constraint — the repeated record-number warning covers two different positions (title line and the paragraph beneath it), not redundancy.

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 two-parameter mutation tool with no annotations and no output schema, the description covers side effects, ledger behavior, formatting enforcement, and the reopen path. The gap is that the tool's return value is never described, which matters given there is no output schema to fall back on.

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 0%, so the description must compensate, and it does extensively for result: length limit, CJK width rule, forbidden joiner, forbidden record numbers, title/body split, and the evidence_ids escape hatch. case_id is only implicitly covered as "a thread" and is never named, leaving one of two parameters without explicit meaning.

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 and resource plus its side effect: "Close a thread (status resolved) and release every worktree bound to it." It also distinguishes the operation from set_status and switch_thread, which are named as the reopen path, so an agent can tell what this tool is and is not for.

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?

Gives a clear condition for the secondary use case — filling the result line of a thread the engineer already closed, signalled by needs_result in list_threads — and names the alternatives for reopening (the screen or set_status, then switch_thread). It does not state when not to use this tool versus set_status for generic status changes, so it falls short of fully explicit routing.

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