Skip to main content
Glama

ddflow_workflow_gate

Define or update a command or agent quality gate, then add it to a task or phase pipeline to enforce completion requirements.

Instructions

Define or change one gate, and optionally put it in a pipeline. WRITES to this project's config.

command makes it a COMMAND gate: ddflow runs it and the exit code is the evidence. prompt makes it an AGENT gate: you perform it and record what you did. A gate needs one of the two — one with neither tells an agent nothing and gives a reviewer no contract, so it is refused.

into adds it to a pipeline (after places it; default is last). required means an item cannot complete without it.

Ask the operator first, and prefer dry_run to show them the change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe gate id, e.g. 'lint' or 'security_scan'.
cwdNo'worktree' (default) or 'repo'.
intoNoAdd to the 'task', 'phase' or 'both' pipeline(s).
afterNoPlace it after this gate. Default: last.
titleNoHuman-readable name.
promptNoWhat an agent must do. Makes it an agent gate.
commandNoShell command to run. Makes it a command gate.
dry_runNoReport the change and write nothing.
timeoutNoSeconds before the command counts as unavailable.
requiredNoAn item cannot complete without it.
reviewerNo'different_family' to require a reviewer from another model family, or 'same_family_ok'.
applies_toNo'task', 'phase' or 'both'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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 behavioral burden. It explicitly states 'WRITES to this project's config', making the mutation clear. It also warns that a gate without command or prompt is refused, and suggests dry_run for previewing changes. This is substantial transparency for a write tool, though it does not detail permission requirements or reversibility.

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?

The description is well-structured, front-loaded with the purpose and write warning, then organized by key behaviors. It uses formatting (backticks) to reference parameters and keeps sentences purposeful. It is not overly verbose, though the operator note at the end could be seen as slightly tangential.

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 12 parameters and no output schema, the description covers the core behaviors: write operation, gate type selection, pipeline integration, and required semantics. It also includes a usage note. The schema fills in the rest, so the description is reasonably complete for an agent to invoke the tool 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 100%, so parameters are documented. The description adds semantic value by explaining the distinction between command and prompt gates, the pipeline placement via into/after, and the required flag. It also clarifies that exactly one of command/prompt is needed. This goes beyond the schema's per-field descriptions, earning a score above the baseline of 3.

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 a specific verb and resource: 'Define or change one gate, and optionally put it in a pipeline.' It distinguishes between command and prompt gates, making the tool's role unmistakable. It also implies a contrast with sibling tools like ddflow_gate_run or ddflow_gate_record, which operate on existing gates rather than defining them.

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 explains when to use the tool: when defining or modifying a gate, and it clarifies the required choice between command and prompt. It also advises asking the operator first and preferring dry_run. However, it does not explicitly contrast with sibling gate tools (e.g., gate_run, gate_record) or state conditions to avoid using it, leaving some inference to the agent.

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