Skip to main content
Glama

patch_story

Edit a story's plan-authored fields atomically without hand-editing the manifest JSON, preventing write races with the scheduler's plan advance tick.

Instructions

Edit a story's plan-authored fields (agent_instructions, model, persona, risk, dependencies, acceptance, pr_url, summary, tdd_split, backend) without hand-editing the manifest JSON. files is not patchable: change the plan's file list via ingest_plan and re-ingest.

Hand-editing the manifest races the scheduler's 60s advance_all_plans tick - a read-modify-write on either side can clobber the other's write. This tool takes the same _plan_lock the scheduler and dispatch_story use, so the edit is atomic with respect to it. Only the fields above may be set; status transitions go through set_story_status, not this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYes
plan_nameYes
story_keyYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/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 delivers rich context: the 60s advance_all_plans tick race, the shared _plan_lock, atomicity with the scheduler and dispatch_story, and the consequence of hand-editing. This is exactly the behavioral context an agent cannot get from schema or annotations.

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?

Four sentences, front-loaded with the core action and field list, followed by the concurrency rationale. Efficient overall, though the field enumeration is dense and could be tightened; nothing is wasted.

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?

Output schema exists, so return values need not be explained. For a nested-object mutation tool with no annotations and 0% schema coverage, the description supplies the exact editable fields, the excluded field, and the concurrency semantics — everything an agent needs to call it correctly.

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 by enumerating the allowed keys inside the free-form `fields` object (agent_instructions, model, persona, risk, dependencies, acceptance, pr_url, summary, tdd_split, backend) and explicitly excluding `files`. Parameters plan_name and story_key remain undocumented but are self-evident from context.

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 (patch/edit) and resource (a story's plan-authored fields) and enumerates the exact editable fields. It also names the sibling set_story_status for status transitions and ingest_plan for file list changes, so an agent can distinguish it from siblings without reading schemas.

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?

Explicitly states when to use this tool (patch plan-authored fields without hand-editing JSON) and when not to (status transitions go through set_story_status; files are not patchable, use ingest_plan instead). Alternatives are named with the condition that selects each.

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