Toggle Task Status
tasks.toggleToggle a task checkbox in Obsidian: swap [ ] to [x] or vice versa by specifying source file and line number. Stamps completion date when marking done.
Instructions
Flip a task line between [ ] and [x] in place, identified by sourceFile and 1-based lineNumber. When marking a task done, a ✅ YYYY-MM-DD date is stamped into the line (default today; override with doneDate). Fails if the target line is not a task checkbox. Use tasks.search to find the right sourceFile/lineNumber pair.
Operates on the session-active vault (see vault.current — selectable via vault.select) unless an explicit vaultPath argument is passed, which always wins.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sourceFile | Yes | Note containing the task. | |
| lineNumber | Yes | 1-based line number of the task line. | |
| doneDate | No | When marking a task done, stamp this date into the `✅ YYYY-MM-DD` metadata. Defaults to today. | |
| vaultPath | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changed | Yes | True if the tool altered vault state on this call; false if it was a no-op. | |
| target | Yes | The path or identifier the tool acted on. | |
| summary | Yes | Short human-readable summary of what happened. |