Skip to main content
Glama

Close task

close_task

Close a task in one transaction: file entries, verdicts, and the final summary, then move it to done, refusing the close if exit conditions are unmet.

Instructions

Closes a task: files the given entries, then the verdicts, then the final summary, and moves the task to done, all in one transaction. It is the only way into done.

A refusal of any part files nothing and leaves the status as it was. The exit conditions are checked after filing: a latest verdict other than failed on every review check within the current pass (checks_not_passed), closed children (task_has_unclosed_children), the task in in_progress (transition_not_allowed). An empty summary part is refused with entry_fields_invalid.

A latest verdict partial or unverifiable on any check adds a service entry warning after the verdicts, naming those checks and outcomes. The task then enters done with the open_warnings feature at 1 until an acceptance or a remark is filed after the warning.

For a parent task the final summary covers the whole work: the children's results are in their own closing summaries.

Tasks this one blocked (blocks) lose the blocked feature, without an entry in their cases.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesTask key `PROJECT-N`, case-insensitive; a previous key of a moved task addresses it as well. An unknown key is refused with `task_not_found`
entriesNoEntries without payload filed before the verdicts, such as `artifact` pointers to the result
summaryYesThe summary the task closes with, filed last and reporting the outcome of the entries and verdicts before it: the first line of `done` states how the task ended, `remaining` is `nothing` or the key of the task the rest went to, `next_step` is `no steps` or that key
verdictsNoVerdicts filed by this call. The list may be empty: verdicts filed earlier in the current pass count equally. A refused call files none of them, so a `failed` verdict sent here leaves no trace in the case, unlike one filed with `add_verdict`
idempotency_keyNoRetry key chosen by the caller, e.g. a UUID. A repeat with the same key and the same arguments returns the first result and creates nothing; the same key with other arguments is refused with `idempotency_key_reused`. A key is bound to the caller's token and kept for 24 hours

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
statusYesTask status
entriesNoFiled entries in filing order, ending with `status_changed`
versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.10.1
    • changedInput schema / $defs / ClosingEntry / properties / type / description
      Previous value: -"What the entry records:\n- `decision` — an option chosen among several, with the reason;\n- `attempt` — something tried and how it ended, failed attempts included;\n- `finding` — an established fact with its source, including what was learned from reading;\n- `artifact` — a pointer to a result;\n- `remark` — a claim that finished work of a task came out wrong, written from the side of whoever needs the result; the task's assignee resolves it with `resolve`. A remark on a closed task is accepted: the case grows, the task stays as it is. An observation about the caller's own task is a `finding`, not a `remark`;\n- `note` — an entry that fits none of the types above"New value: +"What the entry records:\n- `decision` — an option chosen among several, with the reason; a choice that outlives the task and that other tasks are to follow is a project decision, filed by `add_project_entry`;\n- `attempt` — something tried and how it ended, failed attempts included;\n- `finding` — an established fact with its source, including what was learned from reading;\n- `artifact` — a pointer to a result;\n- `remark` — a claim that finished work of a task came out wrong, written from the side of whoever needs the result; the task's assignee resolves it with `resolve`. A remark on a closed task is accepted: the case grows, the task stays as it is. An observation about the caller's own task is a `finding`, not a `remark`. A remark filed after a `warning` clears it;\n- `acceptance` — the gap named by an open `warning` is accepted, which clears it; refused with `warning_not_open` without one, and with `acceptance_by_closer` from the signature that closed the task;\n- `note` — an entry that fits none of the types above"
    • changedInput schema / $defs / ClosingEntry / properties / type / enum
      Previous value: -[
      -  "decision",
      -  "attempt",
      -  "finding",
      -  "artifact",
      -  "remark",
      -  "note"
      -]New value: +[
      +  "decision",
      +  "attempt",
      +  "finding",
      +  "artifact",
      +  "remark",
      +  "acceptance",
      +  "note"
      +]
    • changedInput schema / $defs / ClosingSummary / properties / blockers / description
      Previous value: -"What stands in the way, or `nothing`. In a summary before `waiting` it names what is awaited and from whom"New value: +"What stands in the way, or `nothing`. In a summary before a wait in `open` it names what is awaited, from whom, and its carrier: a `blocking` question or `blocked_by`"
    • changedInput schema / $defs / ClosingSummary / properties / next_step / description
      Previous value: -"The one concrete action a successor starts with. In a summary before `waiting` it is the action taken once the awaited arrives. A doubt about a decision or a result is recorded here, as what to look at and why, rather than as a verdict"New value: +"The one concrete action a successor starts with. In a summary before a wait in `open` it is the action taken once the awaited arrives. A doubt about a decision or a result is recorded here, as what to look at and why, rather than as a verdict"
    • changedInput schema / $defs / ClosingVerdict / properties / outcome / description
      Previous value: -"Outcome of the check; there is no third state"New value: +"Outcome of the check:\n- `passed` — ran as written, expected result in full; evidence naming something not done, a substitute or a red run is not `passed`;\n- `partial` — ran as written, part of the expected result; `evidence` names the missing part;\n- `unverifiable` — cannot run as written (object or environment out of reach, requirements changed); `evidence` names why and what ran instead;\n- `failed` — ran as written, expected result absent.\nAn empty `evidence` with `partial` or `unverifiable` is refused with `entry_fields_invalid`"
    • changedInput schema / $defs / ClosingVerdict / properties / outcome / enum
      Previous value: -[
      -  "passed",
      -  "failed"
      -]New value: +[
      +  "passed",
      +  "partial",
      +  "unverifiable",
      +  "failed"
      +]
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "backlog",
      -  "open",
      -  "in_progress",
      -  "waiting",
      -  "done",
      -  "cancelled"
      -]New value: +[
      +  "backlog",
      +  "open",
      +  "in_progress",
      +  "done",
      +  "cancelled"
      +]
  2. Changed1 schema field changedv0.8.1
    • changedInput schema / $defs / ClosingEntry / properties / refs / description
      Previous value: -"References: task entries `TRK-42#12`, project entries `TRK#7`, tasks `TRK-7`, URLs. An entry, task or project that does not exist is refused with `entry_fields_invalid`; URLs are not checked"New value: +"References: task entries `TRK-42#12`, project entries `TRK#7`, tasks `TRK-7`, or a URL with a scheme (`https://…`, `file://…`). Anything else (`7`, `#7`, `docs/x.md`) is refused with `entry_fields_invalid`, as is an entry, task or project that does not exist; URLs are not checked"
  3. Changed52 schema fields changedv0.5.2
    • changedInput schema / $defs / ClosingEntry / description
      Previous value: -"Запись без нагрузки: та же форма, что у `add_entry`."New value: +"An entry without payload, of the same shape as in `add_entry`."
    • changedInput schema / $defs / ClosingEntry / properties / body / description
      Previous value: -"Тело записи в markdown; хранится и отдаётся как есть"New value: +"Entry body in markdown, stored and returned as is. It holds what a successor needs to continue; file contents and long outputs stay outside it, represented by a pointer and the gist"
    • changedInput schema / $defs / ClosingEntry / properties / refs / description
      Previous value: -"Ссылки: записи `TRK-42#12`, задачи `TRK-7`, адреса. Записи и задачи проверяются на существование, адреса — нет"New value: +"References: task entries `TRK-42#12`, project entries `TRK#7`, tasks `TRK-7`, URLs. An entry, task or project that does not exist is refused with `entry_fields_invalid`; URLs are not checked"
    • changedInput schema / $defs / ClosingEntry / properties / refs / examples
      Previous value: -[
      -  [
      -    "TRK-42#3"
      -  ]
      -]New value: +[
      +  [
      +    "TRK-42#12"
      +  ]
      +]
    • changedInput schema / $defs / ClosingEntry / properties / title / description
      Previous value: -"Заголовок записи: он стоит в описи дела, которую отдаёт `get_task`"New value: +"Entry title: its line in the case index of `get_task`. It states what happened, not how"
    • removedInput schema / $defs / ClosingEntry / properties / title / examples
      Removed value: -[
      -  "Выбран asyncpg вместо psycopg: нужен LISTEN без потока"
      -]
    • changedInput schema / $defs / ClosingEntry / properties / type / description
      Previous value: -"Что случилось: `decision` — выбран вариант из нескольких, `attempt` — попытка и чем кончилась (провал ценнее успеха), `finding` — установленный факт с источником, `artifact` — указатель на результат, `remark` — замечание «вышло не то» к чужой сделанной работе, `note` — всё остальное, и это последний выбор. Сводка, вопрос, ответ, вердикт и резолюция подшиваются своими инструментами"New value: +"What the entry records:\n- `decision` — an option chosen among several, with the reason;\n- `attempt` — something tried and how it ended, failed attempts included;\n- `finding` — an established fact with its source, including what was learned from reading;\n- `artifact` — a pointer to a result;\n- `remark` — a claim that finished work of a task came out wrong, written from the side of whoever needs the result; the task's assignee resolves it with `resolve`. A remark on a closed task is accepted: the case grows, the task stays as it is. An observation about the caller's own task is a `finding`, not a `remark`;\n- `note` — an entry that fits none of the types above"
    • removedInput schema / $defs / ClosingEntry / properties / type / examples
      Removed value: -[
      -  "decision"
      -]
    • changedInput schema / $defs / ClosingSummary / description
      Previous value: -"Финальная сводка. Заголовка не принимает: им становится первая строка `done`.\n\nНа одну часть длиннее промежуточной: `unmeasured` есть только здесь. Обязателен —\nзначение по умолчанию превратило бы «чего не измерили» в поле, которое молча\nопускают ровно в тех делах, где оно и нужно."New value: +"Final summary: the four parts of `add_summary` plus `unmeasured`. It takes no\ntitle: the first line of `done` becomes it."
    • changedInput schema / $defs / ClosingSummary / properties / blockers / description
      Previous value: -"Что мешает. Пустым это поле быть не может: «ничего», если ничего"New value: +"What stands in the way, or `nothing`. In a summary before `waiting` it names what is awaited and from whom"
    • removedInput schema / $defs / ClosingSummary / properties / blockers / examples
      Removed value: -[
      -  "Ничего"
      -]
    • changedInput schema / $defs / ClosingSummary / properties / done / description
      Previous value: -"Что сделано с прошлой сводки, со ссылками на артефакты. Первая строка становится заголовком записи в описи — одной фразой о случившемся; слишком длинную трекер обрежет по границе слова"New value: +"What was done since the previous summary, with references to artifacts. Its first line becomes the entry title in the case index: one sentence about what happened; a longer line is cut at a word boundary"
    • removedInput schema / $defs / ClosingSummary / properties / done / examples
      Removed value: -[
      -  "Разобрался, где сгорает номер задачи"
      -]
    • changedInput schema / $defs / ClosingSummary / properties / next_step / description
      Previous value: -"Одно конкретное действие, с которого начнёт преемник"New value: +"The one concrete action a successor starts with. In a summary before `waiting` it is the action taken once the awaited arrives. A doubt about a decision or a result is recorded here, as what to look at and why, rather than as a verdict"
    • removedInput schema / $defs / ClosingSummary / properties / next_step / examples
      Removed value: -[
      -  "Перенести вызов next_task_number в конец create_task"
      -]
    • changedInput schema / $defs / ClosingSummary / properties / remaining / description
      Previous value: -"Что осталось до выхода задачи"New value: +"What remains before the task is done"
    • removedInput schema / $defs / ClosingSummary / properties / remaining / examples
      Removed value: -[
      -  "Перенести выдачу номера после валидации"
      -]
    • changedInput schema / $defs / ClosingSummary / properties / unmeasured / description
      Previous value: -"Какая часть цели не измерена ни одной обзорной проверкой — и какой риск ты сам считаешь теоретическим. Вердикт отвечает проверке, а не цели: назови то, что ты сделал, но не доказал, что запускал руками вместо проверки и где судил по сходству, а не по замеру. «Ничего» — законный ответ, когда проверки покрыли цель целиком, но это ответ, а не отписка: если в голове вертится «вообще-то я не пробовал…» — это и есть содержание поля"New value: +"Which part of the task's goal no review check measured, and which risks the author considers theoretical: what was done but not proven, what was run by hand instead of a check, where a conclusion rests on similarity rather than measurement. A verdict answers its check, not the goal. `nothing` is a valid value when the checks covered the whole goal"
    • removedInput schema / $defs / ClosingSummary / properties / unmeasured / examples
      Removed value: -[
      -  "Прод-команда экрана не мерилась ни одной проверкой: гонял только дев-путь. Риск считаю теоретическим — команды отличаются одним флагом"
      -]
    • changedInput schema / $defs / ClosingVerdict / description
      Previous value: -"Исход одной обзорной проверки с доказательством."New value: +"Outcome of one review check with its evidence."
    • changedInput schema / $defs / ClosingVerdict / properties / check_no / description
      Previous value: -"Номер обзорной проверки в списке задачи, с 1"New value: +"Number of the review check in the task's list, from 1; a number outside the list is refused with `entry_fields_invalid`"
    • removedInput schema / $defs / ClosingVerdict / properties / check_no / examples
      Removed value: -[
      -  3
      -]
    • changedInput schema / $defs / ClosingVerdict / properties / evidence / description
      Previous value: -"Доказательство исхода: что запустил, что увидел, ссылка на материал"New value: +"What was run for the check as written and what it showed: the command, its output, a link to the material"
    • removedInput schema / $defs / ClosingVerdict / properties / evidence / examples
      Removed value: -[
      -  "docker compose run --rm test: 214 passed"
      -]
    • removedInput schema / $defs / ClosingVerdict / properties / outcome / $ref
      Removed value: -"#/$defs/VerdictOutcome"
    • changedInput schema / $defs / ClosingVerdict / properties / outcome / description
      Previous value: -"Исход проверки. Третьего состояния нет"New value: +"Outcome of the check; there is no third state"
    • addedInput schema / $defs / ClosingVerdict / properties / outcome / enum
      Added value: +[
      +  "passed",
      +  "failed"
      +]
    • removedInput schema / $defs / ClosingVerdict / properties / outcome / examples
      Removed value: -[
      -  "passed"
      -]
    • addedInput schema / $defs / ClosingVerdict / properties / outcome / type
      Added value: +"string"
    • removedInput schema / $defs / VerdictOutcome
      Removed value: -{
      -  "description": "Исход обзорной проверки. Значений ровно два: третьего состояния у проверки нет.",
      -  "enum": [
      -    "passed",
      -    "failed"
      -  ],
      -  "title": "VerdictOutcome",
      -  "type": "string"
      -}
    • changedInput schema / properties / entries / description
      Previous value: -"Записи, которые подшиваются перед вердиктами: обычно `artifact` с указателями на результат"New value: +"Entries without payload filed before the verdicts, such as `artifact` pointers to the result"
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Ключ повтора, который ты придумываешь сам (обычно UUID). Повтор вызова с тем же ключом и теми же аргументами отвечает первым результатом и второго объекта не заводит; тот же ключ с другими аргументами отклоняется. Ключ живёт в паре с твоим токеном и помнится 24 часа"New value: +"Retry key chosen by the caller, e.g. a UUID. A repeat with the same key and the same arguments returns the first result and creates nothing; the same key with other arguments is refused with `idempotency_key_reused`. A key is bound to the caller's token and kept for 24 hours"
    • changedInput schema / properties / key / description
      Previous value: -"Ключ задачи, например `TRK-42`. Регистр не важен"New value: +"Task key `PROJECT-N`, case-insensitive; a previous key of a moved task addresses it as well. An unknown key is refused with `task_not_found`"
    • changedInput schema / properties / summary / description
      Previous value: -"Сводка, которой задача закрывается. Подшивается последней, после присланных записей и вердиктов, поэтому в описи она стоит ниже их и говорит об их исходе"New value: +"The summary the task closes with, filed last and reporting the outcome of the entries and verdicts before it: the first line of `done` states how the task ended, `remaining` is `nothing` or the key of the task the rest went to, `next_step` is `no steps` or that key"
    • changedInput schema / properties / verdicts / description
      Previous value: -"Вердикты, которые подшиваются этим же вызовом. Список может быть пуст: вердикты, подшитые раньше по ходу работы, засчитываются наравне, а требование «положительный последний вердикт по каждой проверке» проверяет сам переход"New value: +"Verdicts filed by this call. The list may be empty: verdicts filed earlier in the current pass count equally. A refused call files none of them, so a `failed` verdict sent here leaves no trace in the case, unlike one filed with `add_verdict`"
    • changedOutput schema / $defs / AppendedEntryView / description
      Previous value: -"Ответ подшивающего инструмента: чем запись адресуют, без самой записи.\n\n`title` непуст только там, где заголовок собрал трекер: у сводки, ответа, вердикта и\nрезолюции его не принимают вовсе (`app/domain/case.py`, `TITLED_ENTRY_TYPES`). Где\nзаголовок прислал агент, здесь стоит `null` — «в описи ровно то, что ты прислал»."New value: +"A filed entry, by its address rather than its content; the entry in full is\nreturned by `read_entries`."
    • addedOutput schema / $defs / AppendedEntryView / properties / no / description
      Added value: +"Entry number in the task's case; with the key it forms `TRK-42#12`"
    • addedOutput schema / $defs / AppendedEntryView / properties / seq / description
      Added value: +"Journal sequence number, usable as `after` of `wait_journal`"
    • addedOutput schema / $defs / AppendedEntryView / properties / title / description
      Added value: +"The title the tracker built, for entry types whose title is not sent (summary, answer, verdict, resolution, service entries); `null` when the caller sent the title"
    • removedOutput schema / $defs / AuthorKind
      Removed value: -{
      -  "description": "Кто именно сделал действие.\n\n`tracker` — сам трекер: этим родом подписаны служебные записи дела и строки,\nзаведённые командой первичной инициализации. У него нет подписи, потому что\nназывать себя по имени ему незачем: трекер в установке один.",
      -  "enum": [
      -    "agent",
      -    "human",
      -    "tracker"
      -  ],
      -  "title": "AuthorKind",
      -  "type": "string"
      -}
    • changedOutput schema / $defs / AuthorView / description
      Previous value: -"Кто сделал действие: род и подпись. У самого трекера подписи нет."New value: +"Who acted: kind and signature. The tracker itself has no signature."
    • removedOutput schema / $defs / AuthorView / properties / kind / $ref
      Removed value: -"#/$defs/AuthorKind"
    • addedOutput schema / $defs / AuthorView / properties / kind / description
      Added value: +"Kind of author. `tracker` signs the service entries the tracker files itself"
    • addedOutput schema / $defs / AuthorView / properties / kind / enum
      Added value: +[
      +  "agent",
      +  "human",
      +  "tracker"
      +]
    • addedOutput schema / $defs / AuthorView / properties / kind / type
      Added value: +"string"
    • removedOutput schema / $defs / TaskStatus
      Removed value: -{
      -  "description": "Зашитый список статусов (`CONCEPT.md`, 3.3).",
      -  "enum": [
      -    "backlog",
      -    "open",
      -    "in_progress",
      -    "waiting",
      -    "done",
      -    "cancelled"
      -  ],
      -  "title": "TaskStatus",
      -  "type": "string"
      -}
    • changedOutput schema / description
      Previous value: -"Ответ закрытия: чем стала задача и чем это подшито, без карточки и без записей.\n\nЭлемент списка — то же `AppendedEntryView`, каким отвечает подшивающий инструмент,\nпоэтому ключ задачи повторяется в каждом: восьмое представление ради двадцати\nсэкономленных байт развело бы две формы одной и той же записи, которые разойдутся\nпри первой правке.\n\nПоле, добавленное сюда позже, обязано иметь значение по умолчанию: ответ создающего\nинструмента живёт сутки в ключах идемпотентности, и вчерашнее тело без нового поля\nне поднимется (`docs/notes/mcp.md`, «Сузить форму ответа создающего инструмента\nможно, расширить — нельзя»)."New value: +"Closed task: key, new status and version, and every entry the call filed."
    • addedOutput schema / properties / entries / description
      Added value: +"Filed entries in filing order, ending with `status_changed`"
    • removedOutput schema / properties / status / $ref
      Removed value: -"#/$defs/TaskStatus"
    • addedOutput schema / properties / status / description
      Added value: +"Task status"
    • addedOutput schema / properties / status / enum
      Added value: +[
      +  "backlog",
      +  "open",
      +  "in_progress",
      +  "waiting",
      +  "done",
      +  "cancelled"
      +]
    • addedOutput schema / properties / status / type
      Added value: +"string"
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare non-destructive and non-read-only, but the description adds crucial behavioral context: atomicity ('in one transaction'), refusal semantics ('files nothing and leaves the status as it was'), the exact exit conditions and their error codes (`checks_not_passed`, `task_has_unclosed_children`, `transition_not_allowed`, `entry_fields_invalid`), warning side effects (`open_warnings` at 1 until acceptance/remark), and the `blocks` side effect. This is far beyond what annotations provide.

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: a lead sentence establishing purpose, then paragraphs on refusal, exit conditions, warnings, parent summaries, and downstream effects. It is dense with useful information but every sentence earns its place. Slightly long, but appropriate for the complexity of the operation.

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?

Given the richness of the schema (nested objects with descriptions) and an output schema, the description supplies all the behavioral and transactional context an agent needs: atomicity, refusal outcomes, exit conditions, warning behavior, parent/child summary semantics, and downstream `blocks` effects. Nothing material is missing.

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 baseline is 3. The description adds meaning beyond the schema: it specifies the filing order (entries, then verdicts, then summary), clarifies that verdicts may be empty because earlier verdicts count, and notes that the summary reports on the entries and verdicts before it. This gives the agent information not fully explicit in the schema field descriptions.

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 the specific verb and resource (closes a task) and enumerates the ordered operations (files entries, verdicts, summary, moves to done) in a single transaction. It also asserts uniqueness ('It is the only way into `done`'), which distinguishes it from `transition` and `add_summary` among siblings.

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 clearly establishes when to use this tool (to reach `done`) and implicitly when not (any other status transition goes through `transition`). It distinguishes its effect from `add_verdict` by noting that a `failed` verdict sent here leaves no trace if the call is refused. It does not name `transition` or `update_task` as explicit alternatives, so it stays short of a 5.

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