Skip to main content
Glama

ddflow_claim

Claim an item to lease it and create an isolated git worktree, preventing overlapping writes. Refuses conflicting or live leases and suggests alternatives; use force only after recovery confirms a crashed agent's worktree is empty.

Instructions

Lease an item and create its isolated git worktree. Refuses (exit 3) if another agent holds it or holds an item whose file globs overlap, and names what you could take instead. NEVER steals an expired lease: a crashed agent's worktree often holds finished work.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesItem id to claim.
noteNoWhat you intend to do.
forceNoOverride a refusal. Legitimate for exactly one thing: retrying after `ddflow_recover` has told you a crashed agent's worktree holds nothing. Forcing past a dependency or a live lease is how two agents end up writing the same file, and the override is recorded either way.
globsNoComma-separated path globs this work will write.
no_worktreeNoLease the item without creating a worktree. For work that is not a code change — a research or review task.

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 full burden. It discloses refusal behavior (exit 3 on conflicts), the condition for legitimate force, the recording of overrides, and the rationale behind not stealing expired leases. This goes beyond basic operation and covers important side effects and failure modes.

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?

Three sentences, front-loaded with the core purpose, followed by critical behavioral warnings. Every sentence earns its place, with no fluff. The ALL-CAPS warning is effective for emphasis without being verbose.

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?

Given the tool's complexity (5 params, conflict handling, force semantics) and the absence of an output schema, the description covers the essential behavioral context: refusal conditions, force legitimacy, and the no-steal rule. It does not describe the full lease lifecycle (e.g., what happens on success), but that is likely covered by sibling tools. The schema fills parameter details, making this sufficiently complete.

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?

The schema covers all 5 parameters with detailed descriptions (100% coverage), so the baseline is 3. The main description adds no parameter-specific meaning, but the schema's descriptions—especially for force—are thorough. The description does not need to repeat what the schema already explains.

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 states a specific verb ('lease') and resource ('an item') plus the concrete action ('create its isolated git worktree'). It is unambiguous and clearly distinguishable from sibling tools like release, recover, or merge, which have different purposes.

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?

It provides clear usage context: it refuses on conflicts, explains when the force override is legitimate (after ddflow_recover), and warns against stealing expired leases. It does not explicitly name alternatives, but the force description references ddflow_recover, giving conditional guidance. This is sufficient for an agent to decide when to call it.

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