Skip to main content
Glama

ddflow_wait

Waits until a work item can be claimed or any task is ready, then returns so agents avoid polling or asking when a claim is refused.

Instructions

Sleep until an item can be claimed -- or, with no item, until anything is ready -- and return the moment it can. Use it instead of polling or asking the operator when a claim was refused because another agent holds the item or overlapping files, or a dependency someone is working on is unfinished. Exit 0: claim now (it says what freed it). Exit 2: the deadline passed, or waiting cannot help (done, cycle, operator hold, a dependency nobody works on) and it says what to do instead. The holder is told you are waiting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemNoThe item to wait for (default: anything ready).
kindNo'task' (default) or 'phase'.
pollNoSeconds between log checks (default 2).
globsNoWith item: the globs you will claim with (comma-separated or a JSON array), so ready means that claim will not be refused for them.
phaseNoWith no item: anything ready in this phase.
timeoutNoSeconds to wait (default 300, at most 1800: a client may time a tool call out, so call again to keep waiting). 0 asks without waiting.
as_agentNoSubagent sharing the parent's connection: your own stable name, for this call only (see ddflow_identify).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.10

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it documents both exit codes and their meanings (0 = claim now and what freed it; 2 = deadline passed or waiting is futile), lists the futility causes, and discloses the side effect that 'the holder is told you are waiting.' This is well beyond what the schema states.

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 core behavior and then behavior under refusal; every sentence earns its place. It is dense with em-dash asides, which slightly slows reading but no content 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?

For a 7-parameter tool with no output schema and no annotations, the description supplies the missing load-bearing context: exit-code contract, futility conditions, and the notification side effect. An agent has enough to call it and interpret the result without further documents.

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 description coverage is 100%, so every parameter (item, kind, poll, globs, phase, timeout, as_agent) is already documented in the schema, including the 1800s cap and default values. The description adds only the framing that timeout-passed maps to exit 2; it does not supply format or semantic detail the schema lacks, so the baseline 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 first clause states a specific verb (sleep/wait) and resource (an item that can be claimed), plus the no-item variant. It is clearly distinguishable from ddflow_claim: this waits for claimability rather than performing the claim.

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 names when to use it ('when a claim was refused because another agent holds the item or overlapping files, or a dependency someone is working on is unfinished') and rules out the alternatives ('instead of polling or asking the operator'). It also enumerates the exit-2 conditions where waiting cannot help, telling the agent when not to use it.

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

Deploy Server

Other Tools