mark_project_done
Close a project and its open tasks, in two steps. Step 1 (without confirm_code): reads the project and its open children, lists them with the warning that they too will be marked done, and returns a code. Nothing is written.
Instructions
Close a project and its open tasks, in two steps. Step 1 (without confirm_code): reads the project and its open children, lists them with the warning that they too will be marked done, and returns a code. Nothing is written. Step 2 (confirm_code from step 1): reads the children again; if the code no longer matches, nothing is closed and the response gives the new list and code. Otherwise each open task is checked off like mark_done (/markDone and reminder cleanup) and the project is closed last with a /doc/update of the app's five fields: done, doneAt and workedOnAt (now), day (the project's day, or today if it has none) and doneDate (same as day) — as the app does. The deadline (dueDate) is not touched. The app itself refuses to close a project with open children; this tool closes them on purpose. The children are checked off with /markDone, which does not set workedOnAt and does not stamp fieldUpdates — the app sets workedOnAt on the children. Stops in step 1 without a code if an open child is a sub-project, a habit task or an occurrence of a recurring task — close those first (the app's behavior there is untested). Completed projects do not show in get_categories. Undo in the app; unmark_done refuses projects. If a step fails the response says which were done; the project then stays open. Cost: step 1 two calls; step 2 three, plus one per task and two more per task with reminders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ID of the project to close | |
| confirm_code | No | The code from step 1. Without a code only the open children and the code are shown; nothing is closed |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||