Skip to main content
Glama

close_abandoned_thread

Destructive

Close an open or in-review thread that will not land as duplicate, abandoned, or superseded; record any duplicate/superseded link and move dependents or open pull requests as allowed.

Instructions

Close an open or in-review thread that will not land, as a duplicate, abandoned, or superseded. The MCP twin of REST POST /threads/:id/close-abandoned. Allowed for the thread's producer, its claim holder, or a maintainer, and audited as thread.close_abandoned. A thread with a result keeps every landing gate (separation of duties, required reviewers, land gate); a thread with no result skips the review gates. A duplicate records a duplicates reference to duplicate_of; a superseded thread records duplicate_of supersedes it. Each open dependent of a duplicate or superseded thread then depends on duplicate_of instead and gets a notice, unless the move would make a cycle; an abandoned thread's dependents keep waiting. A superseded thread with duplicate_of hands the open pull requests the change flow opened for it (not a watched or session-registered one) to duplicate_of, which must be open or in review and not already tracking an open pull request in the same repository: they stay open and queued, and its rounds deliver to them. Every other close withdraws them (out of the merge queue, then closed). Returns the closed thread.

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": {
      "thread_id": "<thread_id>",
      "reason": "<reason>"
    },
    "name": "close_abandoned_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonYesWhy the thread is closed without landing
thread_idYes
duplicate_ofNoThe thread that covers this one: required for duplicate, optional for superseded, refused for abandoned. Must be a live thread you can read in the same workspace. A superseded thread's open pull requests move to it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv479.0.0

TDQS

A4.2/5.0
Behavior5/5

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

Goes well past the destructiveHint/readOnlyHint annotations: it discloses the audit record (thread.close_abandoned), that landing gates are preserved for threads with a result, and precisely how dependents and open pull requests are rewired or withdrawn. It also says what is returned.

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?

Purpose is front-loaded, but the body is five dense sentences with tangled phrasing ('records duplicate_of supersedes it') and repeated threading of the duplicate_of rules. The side-effect rules are valuable, yet the wording could be tightened without losing information.

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?

There is no output schema, and the description still states the return value. For a destructive, non-idempotent mutation with dependency and pull-request side effects, it covers authorization, gating, and downstream consequences thoroughly.

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 67%, and the description compensates well, explaining what duplicate_of must satisfy (live, readable, open or in review, not already tracking an open pull request in the same repository) and the per-reason consequences. The awkward sentence 'a superseded thread records duplicate_of supersedes it' muddies the reason-to-reference mapping.

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

Purpose4/5

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

The first sentence gives a specific verb, resource, and scope: close an open or in-review thread that will not land, with the three named dispositions. It also anchors to a REST twin. It never names a sibling such as cancel_thread, so the agent must infer the distinction itself.

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?

Rich on when it is permitted (producer, claim holder, or maintainer) and on which reason to pick, including that duplicate_of is refused for abandoned. It gives no explicit statement of when to prefer this over cancel_thread or other termination siblings, so the most important comparison is left implicit.

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