close_abandoned_thread
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
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | Why the thread is closed without landing | |
| thread_id | Yes | ||
| duplicate_of | No | The 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 |