Skip to main content
Glama

get_story_worktree

Retrieve a story's worktree status by plan name and story key, including branch, HEAD, commits ahead, uncommitted paths, and masked scratchpad details to assess agent progress.

Instructions

Return the story's worktree status: branch, head, commits ahead of the default branch (max 10), uncommitted paths (max 200) and the agent's scratchpad with secret values masked (max 20000 characters).

plan_name: the plan's name this story belongs to. story_key: the story's key within that plan's manifest.

The worktree is resolved from the story record and contain-checked under the worktrees root; there is no path argument. A story with no worktree returns {"available": False, "reason": "no_worktree"}, a git failure {"available": False, "reason": "git_failed"}. An unknown plan/story returns {"ok": False, "status": 404, "error": ...}.

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": "get_story_worktree"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_nameYes
story_keyYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: it discloses truncation caps (10 commits, 200 paths, 20000 chars), secret masking of scratchpad values, contain-checking under the worktrees root with no path argument, and explicit machine-readable failure shapes (no_worktree, git_failed, 404). This is exactly the kind of safety and failure-mode context an agent needs.

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?

Front-loaded with the return payload, then parameter definitions, then resolution/error behavior — a logical progression with no filler sentences. The parenthetical limits make some sentences dense, but every clause conveys a real constraint rather than restating the name.

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?

For a two-parameter read tool with an output schema, the description goes beyond the minimum: it documents resolution rules, containment security, truncation limits, masking, and all three error outcomes. An agent could invoke it and interpret non-success responses without consulting anything else.

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 document both parameters, and it does: plan_name is defined as the plan the story belongs to, story_key as its key within that plan's manifest — meaningful scoping semantics beyond bare titles. Format/character constraints or examples for the key are still absent, keeping it below a 5.

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 ("Return the story's worktree status") and immediately enumerates the exact fields returned: branch, head, commits ahead, uncommitted paths, scratchpad. This is clearly distinguishable from content-oriented siblings such as get_story_diff, since it returns status metadata rather than diffs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the returned field set, and the note "there is no path argument" plus "resolved from the story record" clarifies the calling convention. However, the description never says when to prefer this over get_story_diff or get_story_log, nor any prerequisite state (e.g. story must be in progress).

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