Skip to main content
Glama

Delimit Agent Complete

delimit_agent_complete

Record a dispatched agent task's result and changed files to mark it completed, preventing it from staying in-flight in the ledger.

Instructions

Close a dispatched agent task by recording the outcome.

When to use: at the end of an engineering subagent's work, to record the result summary and the files touched on the dispatch record. This is the closing step of the dispatch lifecycle (delimit_agent_dispatch -> [subagent runs] -> this). Without calling this, the task remains "dispatched" in the ledger and dashboards will count it as in-flight. For tracked muse workers, call delimit_agent_poll first: completed outputs close here, and uncertain outputs (worker died mid-run) close here only with accept_uncertain=True. When NOT to use: to hand off ownership to a different model (use delimit_agent_handoff), to dispatch a fresh task (delimit_agent_dispatch), or to read task status without closing (delimit_agent_status). Also: do not call repeatedly on the same task_id — the backend treats a second complete as an error. Do not use on cancelled, still-running, or refused worker tasks — the backend rejects those.

Sibling contrast: delimit_agent_handoff transfers active ownership to another model (task stays open); this closes ownership entirely. delimit_agent_status is the read-only sibling. delimit_agent_poll observes a launched worker without closing; this accepts and closes.

Side effects: writes a completion record via ai.agent_dispatch.complete_task — the task's status flips from "dispatched" to "completed", result and files_changed are persisted, and an audit log entry is appended. files_changed is coerced from a comma string to a list. Tracked-launch tasks may only close from "completed"/"uncertain" worker states. No license gate on this lifecycle surface. No notification — pair with delimit_notify if the operator needs to be told.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNoSummary of what was done.
task_idYesTask id from delimit_agent_dispatch. Required.
files_changedNoComma-separated paths of modified files.
accept_uncertainNoIf True, close an "uncertain" worker task anyway. Default False.
review_diff_pathNoOptional diff file path the transcript must bind to.
review_diff_textNoOptional inline diff text the transcript must bind to.
review_transcriptNoOptional deliberation transcript path for review binding (LED-5321 M4).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv4.19.1
    • addedInput schema / properties / accept_uncertain
      Added value: +{
      +  "default": false,
      +  "description": "If True, close an \"uncertain\" worker task anyway. Default False.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / review_diff_path
      Added value: +{
      +  "default": "",
      +  "description": "Optional diff file path the transcript must bind to.",
      +  "type": "string"
      +}
    • addedInput schema / properties / review_diff_text
      Added value: +{
      +  "default": "",
      +  "description": "Optional inline diff text the transcript must bind to.",
      +  "type": "string"
      +}
    • addedInput schema / properties / review_transcript
      Added value: +{
      +  "default": "",
      +  "description": "Optional deliberation transcript path for review binding (LED-5321 M4).",
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv4.7.9
    • addedInput schema / properties / files_changed / description
      Added value: +"Comma-separated paths of modified files."
    • addedInput schema / properties / result / description
      Added value: +"Summary of what was done."
    • addedInput schema / properties / task_id / description
      Added value: +"Task id from delimit_agent_dispatch. Required."
  3. Addedv4.5.5

TDQS

A4.8/5.0
Behavior5/5

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

With only weak annotations (readOnlyHint=false, destructiveHint=false), the description carries the behavioral burden and does so thoroughly: it discloses status flip from dispatched to completed, persistence of result and files_changed, audit log appending, comma-string coercion to list, tracked-launch state constraints, lack of license gate, and absence of notifications. This does not contradict the 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?

The description is long but heavily structured with clear sections (purpose, when to use, when not, sibling contrast, side effects) and front-loads the core purpose. Every sentence carries information, though the length approaches the upper bound for a single tool description.

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 lifecycle-closing tool with output schema present, the description is complete: it covers the full dispatch lifecycle, prerequisite polling for tracked workers, error-prone call patterns, state transition constraints, side effects, and notification behavior. Nothing critical is left for the agent to infer.

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 the baseline is 3, but the description adds useful semantics beyond the schema: task_id comes from delimit_agent_dispatch, files_changed is coerced from a comma string into a list, and accept_uncertain gates closing of 'uncertain' tracked-worker tasks. The review params are left to the schema, which already documents them fully.

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 sentence states a specific verb and resource: 'Close a dispatched agent task by recording the outcome.' The sibling contrast section further distinguishes it from delimit_agent_handoff, delimit_agent_status, delimit_agent_poll, and delimit_agent_dispatch, so an agent can clearly tell this tool apart.

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?

The description explicitly provides a 'When to use' section, a 'When NOT to use' section, and a 'Sibling contrast' section. It names exact alternative tools and the conditions that select them, warns against repeated calls on the same task_id, and lists worker states the backend rejects.

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