toggle_task
Toggles a Markdown checkbox at an exact 1-based line, optionally verifying expected text or state to prevent edits when lines shift.
Instructions
Surgically toggle a Markdown checkbox (- [ ] <-> - [x]) at an exact 1-based line number, optionally verifying expected text/state to guard against shifted lines.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"note": "<note>",
"line": "<line>"
},
"name": "toggle_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | 1-based line number of the task checkbox. | |
| note | Yes | Note path, title, or alias. | |
| vault | No | Optional registered vault name, ID, or path (see list_vaults). Unregistered directories are rejected. | |
| expected_text | No | Optional expected task text at this line; refuses toggle on mismatch. | |
| expected_checked | No | Optional expected current checked state; refuses toggle on mismatch. | |
| expected_mtime_ms | No | Optional expected note mtime_ms; refuses toggle if file changed. |