Skip to main content
Glama

skein_close

Close an issue: status → closed, locked_by cleared, closed_at + closed_reason recorded, issue.closed (+ issue.unclaimed when it was locked) emitted. reason is required (non-empty after trim) — free-form context for a human reader; progress counts use closeOutcome, never the reason. Caller must hold the lock OR pass force=true (force_unlock: project owner, space owner, instance admin); expectedVersion is required; pinned issues require force=true. Optionally attach the git commits that close the issue via commits[]. ANSWERS WITH AN ACKNOWLEDGEMENT by default — the id, the applied state and the new version, no issue card and no prose — so the expectedVersion cycle continues without a re-read; pass verbose for the full IssueDetail.

If a retried transaction aborts while the declared version still matches, serialization_retry means the close rolled back; retry unchanged.

closeOutcome is required when transitioning to closed; repeating a close without it preserves the previous outcome. Target and outcome edits: skein_get_instructions, "Close outcome".

Re-close is NOT idempotent: every call overwrites closed_reason / closed_at and bumps version. To add commit hashes to an already-closed issue without losing the original reason use skein_commits_attach.

Retiring a standing task is rejected with standing_has_open_children (+ childIds, the open children you can see, and unavailableOpenChildren, how many others) while any child is not closed; force does not bypass it.

Close-time warnings ride on the response's TOP level in both modes, under the same names: warning (fires when the issue has open children, or when it is closed with no assignee — both reasons joined when both apply) and openChildList (the open children themselves). Do not confuse openChildList with the nested epic.openChildren counter — different things, deliberately different names.

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": {
      "id": "<id>",
      "expectedVersion": "<expectedVersion>",
      "reason": "<reason>"
    },
    "name": "skein_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesFull hierarchical issue id (e.g. "demo-42").
forceNoBypass lock + version + pinned predicates. Needs the key right `manage` (else `insufficient_scope`) and force_unlock on the issue's project (project owner, space owner, instance admin); others get `force_unlock_forbidden`. Default: false.
reasonYesFree-form reason annotation (non-empty after trim). Lands in events.reason and issues.closed_reason.
commitsNoCommit-refs to link to this issue. Max 10. Each needs `hash`; identify the repo with `repoId` or `repoUrl` from the project's gitRepos[], or omit both when the project has exactly one repo. Re-sends dedup silently per (issue, repo, hash). See skein_get_instructions ("Commit refs").
verboseNoReturn the full IssueDetail, prose included. Default false = acknowledgement: `id`, `ok`, `version` plus the post-state stamps that apply (`status`, `assignee`, lock / claim / close stamps) — no issue card and no free text. The version is always there, so the expectedVersion cycle needs no extra read. Details: skein_get_instructions. If the write applied but its card could not be read back, the answer is the acknowledgement plus `cardUnavailable: true` — read the card with skein_show; do not repeat the write.
closeTargetNoThe issue this one duplicates (duplicate) or that replaced it (superseded); creates that edge in the same transaction.
closeOutcomeNoHow the issue ENDED. Only done counts toward progress; the other three are excluded from scope.
expectedVersionYesThe version the agent expects to see on the issue. The close only proceeds when the live version matches; otherwise returns version_conflict with the live version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / commits / items / properties / author / description
      Previous value: -"Commit author (name or email)."New value: +"Commit author (name or email), at most 256 characters after trimming."
    • changedInput schema / properties / commits / items / properties / message / description
      Previous value: -"Commit subject line."New value: +"Commit subject line, at most 1000 characters after trimming."
    • changedInput schema / properties / commits / items / properties / url / description
      Previous value: -"Canonical commit URL."New value: +"Canonical commit URL: absolute http(s), at most 2048 characters after trimming."
  2. Changed1 schema field changed
    • changedInput schema / properties / force / description
      Previous value: -"Bypass lock + version + pinned predicates. Needs force_unlock on the issue's project (project owner, space owner, instance admin); others get `force_unlock_forbidden`. Default: false."New value: +"Bypass lock + version + pinned predicates. Needs the key right `manage` (else `insufficient_scope`) and force_unlock on the issue's project (project owner, space owner, instance admin); others get `force_unlock_forbidden`. Default: false."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations it discloses re-close non-idempotency, version-conflict behavior, serialization_retry rollback semantics, the standing_has_open_children rejection with its error payload, top-level warning/openChildList placement, and the default acknowledgement response shape. These are substantive behaviors an agent could not infer from readOnlyHint/destructiveHint/idempotentHint alone.

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

Conciseness4/5

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

The core behavior is front-loaded in the first sentence and the sections are logically grouped (preconditions, retry semantics, outcome, warnings). It is dense but nearly every sentence carries operational detail; the verbose paragraph partially restates the schema's verbose field, which is the main redundancy.

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?

With no output schema, the description still specifies the default acknowledgement payload (id, ok, version, stamps), the verbose IssueDetail alternative, and where warnings appear in both modes. For a multi-precondition mutation tool this is complete enough to call correctly without further reading.

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; the description adds cross-parameter meaning by clarifying that reason is free-form human context while progress counts must use closeOutcome, and that commits[] is optional with silent dedup. Most per-field detail (force scopes, hash format, expectedVersion) is already in the schema, so it is additive rather than transformative.

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 first sentence names the verb and resource and enumerates the exact state effects (status → closed, locked_by cleared, closed_at/closed_reason recorded, events emitted). It also differentiates from the sibling skein_commits_attach for the already-closed case, so an agent can tell the two apart without opening a schema.

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?

Explicit preconditions are given: caller must hold the lock or pass force=true, expectedVersion is required, pinned issues require force. It also names the alternative for adding commits to an already-closed issue (skein_commits_attach) and points to skein_get_instructions for close-outcome edits, covering when-to-use and when-not.

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.