update_task
Set the state of one Markdown checkbox identified by path + line (from list_tasks), rewriting exactly one character — the rest of the file, frontmatter included, stays byte-identical.
Instructions
Set the state of one Markdown checkbox identified by path + line (from list_tasks), rewriting exactly one character — the rest of the file, frontmatter included, stays byte-identical. Pass expectText to guard against the line having changed, and prevHash for full compare-and-swap. Setting the current state again is a success no-op.
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": {
"path": "<path>",
"line": "<line>",
"state": "<state>"
},
"name": "update_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | 1-based line number of the task, as returned by list_tasks. | |
| path | Yes | Vault-relative path to the note. | |
| state | Yes | New marker character: "x" (done), " " (open), or a custom marker like "/". | |
| prevHash | No | Optional compare-and-swap guard: the contentHash from a prior read. Fails with hash_conflict if the note changed since. | |
| expectText | No | Optional guard: the task text list_tasks returned. Fails with task_text_mismatch if the line’s text changed since. |