Create Task
vault_create_taskCreate a correctly-formatted task in one call — description, target heading, dates, priority, block_id, and optional checklist sub-items.
Instructions
Create a correctly-formatted task in one call — description, target heading, dates, priority, block_id, and optional checklist sub-items. The task is always created as todo (the Tasks plugin's todo symbol, [ ] by default), with its created date (➕) set to today; set in_progress later with vault_update_task. Metadata uses the format the vault's Tasks plugin is configured for (emoji unless its config says Dataview); override it only at the user's request, since the plugin reads just one format.
Example: vault_create_task({ path: "TASKS.md", description: "Fix login bug", block_id: "fix-login", heading: "Active", priority: "high", due: "2026-09-15" }) — a card in a Kanban board's Active lane Example: vault_create_task({ path: "TASKS.md", description: "Sub-bug", parent_block_id: "fix-login", due: "2026-09-01" }) — full sub-task under fix-login; no block_id on a Kanban sub-task Example: vault_create_task({ path: "Projects/plan.md", description: "Quick fix", block_id: "quick-fix", parent_line: 42 }) — sub-task in a regular note under a parent identified by line number Example: vault_create_task({ path: "TASKS.md", description: "Write release notes", block_id: "release-notes", heading: "Active", position: 3 }) — insert as the 3rd card in the lane
When to use: Creating a new task card on a board or in a note. Guarantees correct field ordering (description → priority → 🔁 recurrence → 🏁 on_completion → ➕ created → 🛫 start → ⏳ scheduled → 📅 due → 🆔 task_id → ⛔ depends_on → ^block_id) so the card round-trips through vault_list_tasks with all fields intact. For lightweight checklist items under an existing card (no metadata), use vault_update_task's add_subtasks param instead.
Parameters:
heading is required on Kanban boards (notes with a kanban-plugin property) unless a parent is given.
parent_block_id / parent_line: the same pair vault_update_task uses (block_id / line). Pass at most one. Either is mutually exclusive with heading — a sub-task lives wherever its parent lives.
block_id / subtasks: block_id is required, except on a Kanban sub-task, where it is refused, as is a subtasks item ending in a ^block-id on a board. When the Kanban plugin saves the board, it copies an indented line's block ID onto its card, replacing the card's own ID.
position: ignored without a heading, and under a parent, where the sub-task goes after the parent's last sub-item.
priority: the plugin ranks "no signifier" (normal priority) between medium and low.
recurrence: a rule ending "when done" bases the next occurrence on the completion day; a task with no dates recurs as a dateless copy.
due / scheduled / start: omit a date rather than guessing — an absent 📅 means "no deadline".
Errors: (messages use camelCase names, e.g. blockId for block_id)
"note not found" — path does not exist; check the path with vault_list_notes
"path must end in …" — add the .md extension
"absolute path blocked" / "path traversal blocked" / "hidden path blocked" — use a vault-relative path with no hidden (dot-prefixed) file or folder in it
"heading required for Kanban boards" — kanban-plugin note without heading; pass heading with the target lane
"heading "X" not found; available: ..." — no heading matches; the error lists the note's headings
"cannot place at position P under "X" — the heading appears N times" — integer position on a note with duplicate heading names; use "top" or "bottom" (they place under the first match), or rename one section to make it unique
"parent task not found" — parent_block_id or parent_line doesn't resolve to a task (message names the blockId or line tried), or the line is inside a fenced code block or %% %% comment; re-read the parent's block_id or line with vault_list_tasks
"parent task ambiguous" — more than one task line ends in that ^id (the message lists their line numbers); pass parent_line instead
"checkbox "[c]" is a NON_TASK status" — the parent's checkbox character (c) is typed NON_TASK in the Tasks plugin's status settings, so it is not a task; the user must change its type there, then restart the server
"no checkbox symbol for status ..." — the Tasks plugin's status settings have no symbol for todo, and the default [ ] character has another type; the user must add a todo symbol there, then restart the server
"parentBlockId and parentLine are mutually exclusive" — both parent_block_id and parent_line were passed; drop one
"parent and heading are mutually exclusive" — a parent (parent_block_id or parent_line) and heading were both passed; drop one
"blockId ... already exists in this note" — pick a block_id not yet used in the note
"blockId ... contains invalid characters" — block_id must match [a-zA-Z0-9-]+
"blockId is required" — pass block_id
"blockId is not allowed on a sub-task on a Kanban board" / "subtask ... ends in a block ID" — drop the block_id, or the trailing ^id from the checklist item
"description is empty" / "subtasks cannot contain an empty item" — whitespace-only description or checklist item; pass visible text
"description must be a single line" / "subtasks items must be a single line" — a task is one file line; a line break in the text would split its metadata onto a line the parser never reads; remove the line breaks
"taskId ... contains invalid characters" / "dependsOn entry ... contains invalid characters" — task_id and every depends_on entry must match [a-zA-Z0-9_-]+ (the Tasks plugin's id grammar)
"unrecognized recurrence rule ..." — the rule text is not Tasks-plugin natural language; written as-is it would silently never recur; use a rule such as "every week" or "every 2 weeks when done"
"invalid date" — a date param fails calendar validation; pass a real YYYY-MM-DD date
"concurrent write in progress" — another write to this note is in flight; retry
"properties block …" — the note's properties block can't be read, or a rewrite would lose it; the error says how to repair it
"the note would open with a properties block …" — the edit would leave --- lines at the top of a note with no properties, around text that can't be kept as properties; the error says how to avoid it
Obsidian syntax: The Tasks plugin reads metadata off the END of a task line. When description or subtasks text ends in a signifier the plugin's parser recognizes as a field (an emoji field like "🔁 every week", or a Dataview [key:: value] field), with only other recognized fields after it, that text is read back as metadata, not text. Whether it is captured depends on the field's value grammar: 🔁 reads any trailing words as its recurrence rule, while 📅 followed by non-date words stays description text. Captured text can also change the value read back for the field beside it, or add a field the call never set. The write still succeeds either way; when the stored line would read back differently than submitted, the result carries an advisories array naming each divergence; reword the text to avoid one.
Returns: JSON { path, line, description, block_id, heading, subtasks, changes, advisories } — line is the new task's 1-based line number in the file; description is the text as submitted; block_id is omitted when the task has none (line is then its handle); heading is the nearest heading above the new task (omitted when the note has none); subtasks lists each checklist item written as { line, description } (omitted when none) — checklist items are written without a block_id, so line is the handle for a follow-up update; changes lists every field written as "field: (none) → value", and checklist items as "subtasks: 0 → N"; advisories (omitted when the line round-trips clean) lists one sentence per place the stored line parses back differently than submitted — see Obsidian syntax above.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| due | No | Deadline (📅), YYYY-MM-DD, calendar-validated. Omit when there is no deadline. | |
| path | Yes | Vault-relative path to the note (must end in ".md"). The note must already exist. Use the exact letter case. | |
| start | No | Earliest day work can begin (🛫), YYYY-MM-DD, calendar-validated. | |
| format | No | Field format. Default: auto-detected from .obsidian/ config, falling back to emoji. | |
| heading | No | Target heading's text, without the # marks, matched exactly. On a regular note, omit to append at end of body. | |
| task_id | No | Tasks plugin 🆔 identifier other tasks can name in depends_on — letters, digits, hyphens, and underscores; separate from block_id. | |
| block_id | No | The ^block-id (without the ^) for stable identification — letters, digits, and hyphens only ([a-zA-Z0-9-]+), unique within the note. | |
| position | No | Where within the heading section the task is placed: "top" first in the section, "bottom" at the end of the section, or a 1-based integer for an exact slot among the section's top-level tasks (a Kanban lane's cards; nested tasks are not counted). A position past the count lands directly below the last top-level task (unlike "bottom", which appends after any non-task text at the end of the section). Defaults to "bottom" ("top" on Kanban boards set to new-card-insertion-method: "prepend"). | |
| priority | No | Priority signifier: highest 🔺, high ⏫, medium 🔼, low 🔽, lowest ⏬. Omit for normal priority — no signifier is written. | |
| subtasks | No | Checklist sub-items: text-only todo lines indented under the card, with no metadata (not even ➕). For a sub-task with dates or priority, make a separate call with parent_block_id. | |
| scheduled | No | Day the work is planned for (⏳), YYYY-MM-DD, calendar-validated. | |
| depends_on | No | Tasks plugin ⛔ dependency IDs (🆔 values of other tasks), not checked against existing tasks. Non-empty; omit when there are no dependencies. | |
| recurrence | No | Tasks plugin 🔁 rule in natural language (e.g. "every week", "every month on the 15th", "every 2 weeks when done"). Completing the task spawns its next occurrence. | |
| description | Yes | The task text (before metadata fields). | |
| parent_line | No | 1-based line number of an existing task to nest under as a sub-task. Fragile if the file changed since the line was read. | |
| on_completion | No | Tasks plugin 🏁 onCompletion action. "delete" removes the task line and its children on completion; "keep" leaves it in place, as omitting the field does. | |
| parent_block_id | No | ^block-id (without the ^) of an existing task to nest under as a sub-task. |