Obsidian CLI MCP
v0.4.1Local MCP server for Obsidian Desktop via the official Obsidian CLI.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
note_read Read note
Read the full Markdown contents of a note by its vault-relative path.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative path, e.g. 'Projects/Apollo.md'. |
vault_search Search vault
Full-text search across the vault, returning matching note paths. Optional filters (tag, frontmatter type/status) are combined with the query via Obsidian search operators.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max number of files to return. |
query | string | Text to search for. |
status | string | Restrict to a frontmatter 'status' value. |
tag | string | Restrict to a tag (with or without leading #). |
type | string | Restrict to a frontmatter 'type' value. |
note_list List notes
List files in the vault, optionally filtered by folder and extension.
| Parameter | Type | Description |
|---|---|---|
ext | string | Restrict to a file extension, e.g. 'md'. |
folder | string | Restrict to a folder (vault-relative). |
limit | integer | Max number of files to return. |
sort | string | Sort order. |
vault_tags List tags
List all tags in the vault with their occurrence counts.
unresolved_links List unresolved links
List unresolved (broken) wikilinks across the vault.
tasks_list List tasks
List tasks (checkboxes) in the vault. Scope to the whole vault, the daily note, or the active note.
| Parameter | Type | Description |
|---|---|---|
filter | string | Task completion filter. |
scope | string | Which notes to scan. |
note_diff Diff note versions
Show a note's version history, or diff two versions. Omit from/to to list available versions.
| Parameter | Type | Description |
|---|---|---|
file * | string | Vault-relative path to the note. |
from | integer | Version number to diff from. |
to | integer | Version number to diff to. |
note_create Create note
Create a new note, optionally in a folder, from a template, with initial content and frontmatter.
| Parameter | Type | Description |
|---|---|---|
name * | string | Note name (a '.md' extension is added if missing). |
content | string | Initial Markdown content. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
folder | string | Destination folder (vault-relative). Defaults to vault root. |
frontmatter | object | Frontmatter keys to stamp on the new note. |
overwrite | boolean | Overwrite if the note already exists. |
template | string | Obsidian template name to apply. |
note_append Append to note
Append Markdown to a note, optionally under a specific heading.
| Parameter | Type | Description |
|---|---|---|
content * | string | Markdown to append. |
path * | string | Vault-relative path to the note. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
heading | string | If set, append to the end of this heading's section. |
inline | boolean | Append without a leading newline (plain append only). |
note_set_frontmatter Set note frontmatter
Patch a note's YAML frontmatter via processFrontMatter (never a raw rewrite). A null value removes a key.
| Parameter | Type | Description |
|---|---|---|
patch * | object | Keys to set; a null value deletes the key. |
path * | string | Vault-relative path to the note. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
daily_open Open daily note
Open today's daily note (creating it if needed).
| Parameter | Type | Description |
|---|---|---|
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
daily_append Append to daily note
Append Markdown to today's daily note.
| Parameter | Type | Description |
|---|---|---|
content * | string | Markdown to append. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
inline | boolean | Append without a leading newline. |
note_replace_range Replace note text range
Replace a half-open text range in a vault note using zero-based UTF-16 line/ch positions. An optional expected value guards against stale reads.
| Parameter | Type | Description |
|---|---|---|
end * | object | Exclusive end position (zero-based line/ch). |
path * | string | Vault-relative path to the note. |
start * | object | Inclusive start position (zero-based line/ch). |
text * | string | Replacement text; may contain newlines. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
expected | string | Optional exact guard: the current text in the range must match this value. |
note_insert_at Insert text at note cursor
Insert text at a zero-based UTF-16 line/ch cursor in a vault note. Optional surrounding context guards reject stale cursor positions.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative path to the note. |
position * | object | Insertion cursor (zero-based line/ch). |
text * | string | Text to insert at the cursor; may contain newlines. |
contextAfter | string | Optional exact text immediately after the cursor; rejects stale positions. |
contextBefore | string | Optional exact text immediately before the cursor; rejects stale positions. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
note_replace Replace note text
Compatibility alias for note_replace_range with the same positional and expected-text guards.
| Parameter | Type | Description |
|---|---|---|
end * | object | Exclusive end position (zero-based line/ch). |
path * | string | Vault-relative path to the note. |
start * | object | Inclusive start position (zero-based line/ch). |
text * | string | Replacement text; may contain newlines. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
expected | string | Optional exact guard: the current text in the range must match this value. |
note_insert Insert note text
Compatibility alias for note_insert_at with the same cursor and context guards.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative path to the note. |
position * | object | Insertion cursor (zero-based line/ch). |
text * | string | Text to insert at the cursor; may contain newlines. |
contextAfter | string | Optional exact text immediately after the cursor; rejects stale positions. |
contextBefore | string | Optional exact text immediately before the cursor; rejects stale positions. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
file_import Import file into vault
Copy a local file from a configured import root into the vault. Destination names are collision-safe by default; source roots, size, destination policy, and dryRun are enforced.
| Parameter | Type | Description |
|---|---|---|
sourcePath * | string | Absolute local path to the file being imported. |
collision | string | Override the configured collision policy for this import. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
folder | string | Optional vault-relative destination folder. |
name | string | Optional destination filename; defaults to the source filename. |
attachment_import Import attachment into vault
Semantic alias for file_import for attachment-oriented callers; the same source, size, path, and collision guards apply.
| Parameter | Type | Description |
|---|---|---|
sourcePath * | string | Absolute local path to the file being imported. |
collision | string | Override the configured collision policy for this import. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
folder | string | Optional vault-relative destination folder. |
name | string | Optional destination filename; defaults to the source filename. |
note_attach Import and attach file to note
Import a local file into the vault and optionally insert a relative Obsidian embed into a note. The imported file is retained if the note insertion fails, with its recovery path in the error.
| Parameter | Type | Description |
|---|---|---|
note * | string | Vault-relative Markdown note to receive the embed. |
sourcePath * | string | Absolute local path to the file being imported. |
caption | string | Optional embed caption, rendered as ![[file|caption]]. |
collision | string | |
contextAfter | string | Optional exact text immediately after the insertion cursor. |
contextBefore | string | Optional exact text immediately before the insertion cursor. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
embed | boolean | Insert an Obsidian embed after importing the file. |
folder | string | Optional vault-relative destination folder for the imported file. |
name | string | Optional destination filename. |
position | object | Optional zero-based cursor for the embed insertion. |
attachment_embed Import and embed attachment
Semantic alias for note_attach: import an attachment and embed it in a note with the same guards.
| Parameter | Type | Description |
|---|---|---|
note * | string | Vault-relative Markdown note to receive the embed. |
sourcePath * | string | Absolute local path to the file being imported. |
caption | string | Optional embed caption, rendered as ![[file|caption]]. |
collision | string | |
contextAfter | string | Optional exact text immediately after the insertion cursor. |
contextBefore | string | Optional exact text immediately before the insertion cursor. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
embed | boolean | Insert an Obsidian embed after importing the file. |
folder | string | Optional vault-relative destination folder for the imported file. |
name | string | Optional destination filename. |
position | object | Optional zero-based cursor for the embed insertion. |
file_move Move vault file
Move a regular vault file to another vault-relative path with explicit collision policy.
| Parameter | Type | Description |
|---|---|---|
destination * | string | |
path * | string | |
collision | string | |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
file_rename Rename vault file
Rename a vault file in its current folder with collision-safe naming.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
path * | string | |
collision | string | |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
file_delete Delete vault file
Delete one regular vault file. Requires confirm=true; dryRun can preview without confirmation.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
confirm | boolean | |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
file_read_binary_metadata Read binary file metadata
Read MIME type, byte size, SHA-256, and supported image dimensions for a vault file.
| Parameter | Type | Description |
|---|---|---|
path * | string |
task_create Create task
Create a Markdown checkbox task in a note, optionally under a heading.
| Parameter | Type | Description |
|---|---|---|
note * | string | Vault-relative note receiving the task. |
text * | string | Task text. |
checked | boolean | Create the task as completed. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
heading | string | Optional Markdown heading section to append under. |
indent | integer | Number of leading spaces. |
task_update Update task
Update one Markdown task at a zero-based line number. The optional expected line is an exact stale-read guard.
| Parameter | Type | Description |
|---|---|---|
line * | integer | Zero-based line number of the task. |
note * | string | Vault-relative note containing the task. |
checked | boolean | New completion state. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
expected | string | Exact current task line; rejects stale updates when it differs. |
text | string | New task text. |
backlinks_get Get backlinks
List notes with native Obsidian backlinks to a vault note.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative target note path. |
outlinks_get Get outgoing links
List native Obsidian wikilinks outgoing from a vault note.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative note path. |
total | boolean | Ask the native CLI for a total-only result. |
canvas_add_node Add Canvas node
Add one native Canvas node by type. Omitted IDs are deterministic from the requested node content.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
type * | string | |
background | string | |
backgroundStyle | string | |
color | string | |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
file | string | |
height | integer | |
id | string | |
label | string | |
subpath | string | |
text | string | |
url | string | |
width | integer | |
x | integer | |
y | integer |
canvas_add_edge Add Canvas edge
Add one native Canvas edge between existing node IDs; endpoints are validated before writing.
| Parameter | Type | Description |
|---|---|---|
fromNode * | string | |
path * | string | |
toNode * | string | |
color | string | |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
fromEnd | string | |
fromSide | string | |
id | string | |
label | string | |
toEnd | string | |
toSide | string |
canvas_auto_layout Auto-layout Canvas
Deterministically lay out Canvas nodes using a dependency-free grid or hierarchical graph algorithm.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
algorithm | string | |
direction | string | |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
spacingX | integer | |
spacingY | integer | |
startX | integer | |
startY | integer |
note_rename Rename note
Rename a note in place (new name). Backlinks are rewritten automatically.
| Parameter | Type | Description |
|---|---|---|
from * | string | Vault-relative path of the note to rename. |
to * | string | New note name (basename, '.md' optional). |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
note_move Move note
Move a note to another folder or path. Links are preserved.
| Parameter | Type | Description |
|---|---|---|
from * | string | Vault-relative path of the note to move. |
to * | string | Destination folder or vault-relative path. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
folder_create Create folder
Create a folder (and any missing intermediate folders) in the vault.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative folder path to create. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
note_delete Delete note
Delete a note. Honors the configured delete.mode (trash by default, or permanent).
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative path of the note to delete. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
note_transition Transition note state
Move a note to a new lifecycle state, validated against a configured workflow. Sets the workflow's frontmatter property if the transition is allowed.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative path to the note. |
to * | string | Target state. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
workflow | string | Workflow name (required only if several are configured). |
canvas_read Read Canvas
Read and validate a native Obsidian .canvas file, returning structured nodes and edges.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative path ending in .canvas. |
canvas_create Create Canvas
Create a native Obsidian .canvas file, optionally with initial nodes and edges. Existing files are not overwritten unless overwrite is true.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative destination path ending in .canvas. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
edges | array | Initial native Canvas edges. |
nodes | array | Initial native Canvas nodes. |
overwrite | boolean | Explicitly allow replacing an existing file. |
canvas_upsert_nodes Upsert Canvas nodes
Add or partially update native Canvas nodes by stable ID. Existing nodes, edges, top-level fields, and unknown node fields are preserved.
| Parameter | Type | Description |
|---|---|---|
nodes * | array | Node patches keyed by stable id. |
path * | string | Vault-relative path ending in .canvas. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
canvas_upsert_edges Upsert Canvas edges
Add or partially update native Canvas edges by stable ID. Existing unaddressed edges are preserved and endpoints must reference nodes.
| Parameter | Type | Description |
|---|---|---|
edges * | array | Edge patches keyed by stable id. |
path * | string | Vault-relative path ending in .canvas. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
canvas_remove Remove Canvas items
Remove explicitly named node and/or edge IDs. Removing a node also removes every incident edge deterministically.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative path ending in .canvas. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |
edgeIds | array | Edge IDs to remove. |
nodeIds | array | Node IDs to remove. |
canvas_open Open Canvas
Open a native Obsidian .canvas file through the existing Obsidian CLI file-opening function.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vault-relative path ending in .canvas. |
dryRun | boolean | Preview the change without applying it: returns the planned action and the exact CLI command. |