Skip to main content
Glama

get_story_diff

Retrieve an in-flight story's worktree diff summary, or fetch one listed file's diff by passing its repo-relative path. Returns availability or 404 errors for missing worktrees, plans, or stories.

Instructions

Return the in-flight story's worktree diff summary, or one file's diff when path is given.

plan_name: the plan's name this story belongs to. story_key: the story's key within that plan's manifest. path: optional repo-relative path; must be one of the files listed in the summary. Over-long values are truncated to MAX_PATH_LENGTH and so will not match any listed file.

A story with no worktree returns {"available": False, "reason": ...} rather than raising. 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_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
plan_nameYes
story_keyYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose non-obvious behavior: a missing worktree yields {"available": False, "reason": ...} instead of an exception, an unknown plan/story yields a 404-shaped result, and over-long paths are silently truncated before matching. It never explicitly says the call is read-only, but 'Return ... diff' implies it.

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

Conciseness5/5

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

The first sentence establishes the two modes, then parameters are presented one per line, then failure modes. No sentence is filler, and the most important routing information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

All three parameters are meaningful, the two error paths are documented, and the output schema handles return shape so the description needn't restate it. The only small gap is what the summary itself contains (i.e. where the file list the `path` must match comes from), which an agent must infer.

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 compensate, and it does: `plan_name` and `story_key` are positioned relative to each other (story key within the plan's manifest), and `path` is defined as repo-relative with a matching constraint and a truncation quirk. It could go further on what the summary contains or how plan names are formatted, but the essential semantics are supplied.

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 in-flight story's worktree diff summary, or one file's diff when `path` is given") and explicitly distinguishes the two operating modes. No sibling tool in the list covers diffs, so the distinctness is implicit but obvious.

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?

The `path` sentence gives a clear selection rule: omit it for the summary, supply it for one file. It also states a precondition (the path must appear in the summary), but offers no explicit 'when not to use' guidance or pointer to an alternative tool.

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