Skip to main content
Glama

close_task

Closes a task by filing entries, verdicts, and a final summary, then moves it to done in one transaction; it is the only path to done.

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 passing latest verdict 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.

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. 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"
  2. 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"
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only supply the safety flags; the description carries the real behavioral load: all-or-nothing semantics ('A refusal of any part files nothing and leaves the status as it was'), the post-filing order in which exit conditions are evaluated, and a side effect on other tasks ('Tasks this one blocked (`blocks`) lose the `blocked` feature, without an entry in their cases'). Retry behavior is disclosed via idempotency_key binding to the caller's token for 24 hours. The side effect on blocked tasks is a mild tension with destructiveHint=false but is not a contradiction (no data is destroyed and the behavior is fully disclosed).

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-loads the core action and atomicity in the first sentence, then failure semantics, then the downstream side effect. Dense but every paragraph earns its place; the only slight cost is that the trailing `blocks` paragraph reads as an afterthought rather than being surfaced earlier.

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 transactional, multi-part write with an output schema available, the description covers the failure modes, their error codes, ordering, idempotency and external side effects — everything an agent needs to decide and to interpret a refusal. Return-value detail is correctly omitted since an output schema exists.

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 description coverage is 100%, so the baseline is 3; the description adds cross-parameter semantics the schema cannot express — the filing order (entries, then verdicts, then summary), that an empty verdicts list is legal because earlier verdicts count, and that the summary reports on the entries and verdicts preceding it. It does not duplicate enum or ref-format detail already in the schema.

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?

Names a specific verb and resource ('Closes a task'), enumerates the ordered sub-operations (entries, verdicts, final summary), states the atomicity ('all in one transaction') and the exclusivity claim ('It is the only way into `done`'). An agent can distinguish this from add_entry, add_summary and add_verdict without opening any schema.

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?

Gives the entry condition (the only path to `done`), the exact refusal conditions with their error codes (`checks_not_passed`, `task_has_unclosed_children`, `transition_not_allowed`, `entry_fields_invalid`), and one routing rule against a sibling ('a `failed` verdict sent here leaves no trace in the case, unlike one filed with `add_verdict`'). It does not systematically cover the other siblings (add_summary, transition), but the when/when-not guidance is concrete.

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