Skip to main content
Glama

mark_story_done

Record a merged story as done, update its ticket and manifest status, clear stale parked reasons, and notify when the plan's final story completes.

Instructions

Mark a story finished: sets its ticket (Plane, when enabled) to Done, sets manifest["stories"][story_key]["status"] to "done", and clears any stale parked_reason. If this was the plan's last remaining story, fires the plan-completion notification.

plan_name: the plan's name, as returned by list_plans or passed to save_plan/ingest_plan. story_key: the story's key within that plan's manifest, as returned by list_ready_stories, check_story_status, or dispatch_story.

Call this only after the story's PR has actually been reviewed and merged — approve_merge already calls this internally as its last step, so you normally only need to call mark_story_done directly for a merge that happened outside the pipeline (e.g. a manual gh pr merge you've already confirmed passed CI). It does not merge or verify anything; after recording the work as done it removes the story's worktree and local branch when the worktree is clean and inside WORKTREE_ROOT. If another dispatch/ingest/interrupt holds the plan's lock, this is a no-op that returns {"ok": True, "skipped": "locked", ...} rather than blocking or raising — retry the call rather than assuming failure.

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": {
      "plan_name": "<plan_name>",
      "story_key": "<story_key>"
    },
    "name": "mark_story_done"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_nameYes
story_keyYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and meets it: it discloses all side effects (ticket update, manifest mutation, parked_reason clearing, plan-completion notification, worktree and local branch removal gated on cleanliness and WORKTREE_ROOT). It also documents the lock-contention behavior as a non-blocking no-op with a concrete return shape ({"ok": True, "skipped": "locked", ...}) and advises retrying rather than treating it as failure.

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 structure is logical — behavior, then parameter definitions, then the usage gate, then the edge-case caveat — and each section earns its place. It is dense and slightly long for a two-parameter tool, but no sentence is redundant given the absence of annotations.

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?

An output schema exists, so return values need not be explained, yet the description still calls out the exceptional locked response shape. For a mutation tool with no annotations, it covers preconditions, side effects, failure mode, and recovery action — nothing an agent needs in order to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and does: plan_name is defined as 'the plan's name, as returned by list_plans or passed to save_plan/ingest_plan', and story_key as the key within that plan's manifest as returned by list_ready_stories, check_story_status, or dispatch_story. That provenance tells the agent exactly where to source each value, well beyond the bare string types in the schema.

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 opening sentence gives a specific verb+resource ('Mark a story finished') and enumerates the exact state changes: ticket set to Done, manifest status set to 'done', stale parked_reason cleared. It also names the sibling that usually performs this work (approve_merge) and the sibling tools that supply the parameters, so an agent can place it precisely in the pipeline.

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 when-to-use: 'Call this only after the story's PR has actually been reviewed and merged', plus a when-not/deduplicate rule — approve_merge already calls this internally, so direct calls are reserved for out-of-pipeline merges such as a confirmed manual 'gh pr merge'. It also clarifies what the tool does not do ('does not merge or verify anything'), which prevents misuse as a merge verification step.

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