Skip to main content
Glama
Obsidian MCP (pgvector + Ollama, self-hosted)

Obsidian MCP (pgvector + Ollama, self-hosted)

by maxkuminov

Update task

update_task
Destructive

Change 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

NameRequiredDescriptionDefault
idYes
dueNo
pathYes
textNo
clearNo
startNo
statusNo
dry_runNo
add_tagsNo
priorityNo
scheduledNo
recurrenceNo
remove_tagsNo
expected_hashNo
append_contextNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past the annotations: it describes the conflict-retry policy (fresh read, max 3 attempts, then `concurrent_write`), the refusal envelope (`MCP-REFUSAL {"code":…}` lines write nothing, protocol-validation failures do not), the `No changes` no-op response, id rotation after every edit, and index-refresh reporting. It also spells out mutation side effects such as `cancelled` adding `❌ <today>` and never writing a next occurrence.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then semantics, then codes, then a per-argument block — a sensible structure for a 15-parameter destructive tool, and the length is mostly earned. It is docked for redundancy: the argument names are enumerated in prose and then re-enumerated in the Args block, so the same list appears twice.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, yet the description still tells the agent what comes back (changed fields, new line and id, content_hash, resolved timezone/dates, index status), which is a bonus rather than a requirement. For a destructive, non-idempotent mutation with 15 params, nothing an agent needs in order to call it correctly or recover from a failure is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and no enums are declared, so the description carries the full burden and does: it names the allowed priority values, the three legal statuses with their checkbox renderings, the tag cap (32), the text constraints (one line, 1–1,000 chars, no emoji), and the removable field set for `clear`. The only flaw is the dangling "a date form as above" on `due`/`scheduled`/`start`, which points at text not present in this description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource plus the full field scope: "Change one task's dates, priority, tags, recurrence, status, description or context, in place." It explicitly routes the adjacent case away with "To complete a task use `complete_task`," so the agent can separate it from the nearest sibling without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States preconditions (write permission via readwrite key or OAuth scope), when the expected_hash argument is mandatory (suffixed ids like `<key>.<i>of<n>`), when it is optional, and the explicit alternative (`complete_task`). It also names `list_tasks`/`task_agenda` as the source of ids and `read_note` as the source of content_hash.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.