Skip to main content
Glama

ddflow_recover

Recover from interrupted sessions by inspecting expired leases, orphaned worktrees, and stuck items. Reports contents without deleting, enabling safe cleanup decisions at session start.

Instructions

Find work left behind by a crashed agent: expired leases, orphaned worktrees, items stuck running. Reports what each worktree contains and never deletes anything. Run this at the start of any session that follows an interruption.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemNoRestrict to one item.
applyNoAct on the advice: release the leases and remove the worktrees this reports as holding nothing. It only ever touches a tree MEASURED as having no uncommitted and no unmerged work — one that could not be measured is never removed, because 'could not tell' is not 'empty'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It explicitly states the tool 'never deletes anything' in its default operation, and the apply parameter's behavior is thoroughly described in the schema. However, the description does not mention that apply can remove worktrees, which could be misleading without reading the schema; this slight ambiguity prevents a perfect score.

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 description is three sentences with no fluff. It front-loads the primary purpose, then adds safety and usage context. Every sentence adds value, and the structure is clear and efficient.

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?

For a tool with two optional parameters and no output schema, the description covers the essential context: what it finds, its safety guarantee, and when to use it. It does not describe the exact report format or the nature of 'advice,' but these are adequately implied and the tool's complexity is low.

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

Parameters3/5

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

Schema coverage is 100% and both parameters are already well-documented in the schema. The description adds no additional parameter-specific meaning beyond what the schema provides, so the baseline of 3 applies.

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 description clearly states the tool's purpose: finding work left behind by a crashed agent, listing specific artifact types (expired leases, orphaned worktrees, stuck items). It explicitly distinguishes itself from deletion tools by stating 'never deletes anything,' and the 'reports' verb clarifies it's a diagnostic tool.

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 description provides a clear usage trigger: 'Run this at the start of any session that follows an interruption.' It does not explicitly name alternative tools or say when not to use it, but the context is specific enough for an agent to recognize the appropriate scenario.

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