Update task
update_taskChange one task's due date, priority, tags, recurrence, status, or context in place while preserving the rest of the Obsidian note. Preview with a dry run before writing.
Instructions
Change one task's dates, priority, tags, recurrence, status, description or context, in place. Requires write permission (a readwrite API key or OAuth scope).
Arguments: path and id (both from a listing); the changes due,
scheduled, start, priority, add_tags, remove_tags, recurrence,
status, text, append_context and clear; dry_run and the
expected_hash precondition.
Every refusal the server raises ends with one machine-readable
MCP-REFUSAL {"code":…} line and writes nothing; an undeclared or
mistyped argument is rejected by protocol validation before the tool runs
and carries no such line.
The id, from a list_tasks or task_agenda row, is re-checked against
the note's current text, never a line number, so the call changes only
the line it names or refuses. A task's id changes whenever its line
changes; the response returns the new one. An id shaped <key>.<i>of<n>
names one of several identical lines and is accepted only with
expected_hash, the note's content_hash from read_note; without it
the call is refused precondition_required. To complete a task use
complete_task.
Only the named fields change: a value is replaced where it stands, an
added field goes into the trailing emoji fields, and every other
character of the line and the note is kept. Plain checkboxes work;
Tasks-plugin fields are added as you set them. text replaces the
description's words and keeps its tags; only remove_tags removes a tag
(whole tags, case-insensitive). status: open ([ ]) or in_progress
([/]) drop ✅/❌; cancelled ([-]) adds ❌ <today> per your task
settings and never writes a next occurrence. append_context adds one
indented - <text> line after everything already under the task.
dry_run=true returns the diff and the new line(s) and writes nothing.
expected_hash is optional otherwise and binds the whole note (refused
stale_precondition if it changed). Without it, a change made by someone
else during the call is retried from a fresh read, at most 3 attempts,
then refused concurrent_write. A call that would change nothing answers
No changes. The response names the fields changed and gives the new
line and id, content_hash, the timezone and dates resolved, and
index: refreshed or index: may lag (<reason>) (the write stands).
Codes: task_not_found (the line changed since the listing: list again),
task_ambiguous, task_changed, precondition_required,
stale_precondition, malformed_precondition, concurrent_write,
recurrence_unsupported, task_malformed (fix the line with
edit_note), content_unsafe (a malformed frontmatter block: the
refusal names the repair), size_limit, invalid_argument (also
status="done"), not_found, permission_denied.
Args:
path: The note's vault-relative path, unescaped (a listing shows
\-escapes).
id: The task id from a list_tasks or task_agenda row.
due: New due date (📅), a date form as above.
scheduled: New scheduled date (⏳), same forms.
start: New start date (🛫), same forms.
priority: highest, high, medium, low or lowest.
add_tags: Tags to add (at most 32).
remove_tags: Tags to remove.
recurrence: A 🔁 rule from the grammar complete_task lists.
status: open, in_progress or cancelled.
text: The new description: one line, 1–1,000 characters, no emoji.
append_context: One line of context to add under the task.
clear: Fields to remove: any of due, scheduled, start,
priority, recurrence.
dry_run: Preview the change without writing.
expected_hash: content_hash from read_note; needed for a suffixed id.
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>",
"id": "<id>"
},
"name": "update_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| due | No | ||
| path | Yes | ||
| text | No | ||
| clear | No | ||
| start | No | ||
| status | No | ||
| dry_run | No | ||
| add_tags | No | ||
| priority | No | ||
| scheduled | No | ||
| recurrence | No | ||
| remove_tags | No | ||
| expected_hash | No | ||
| append_context | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |