Skip to main content
Glama
pvliesdonk

markdown-vault-mcp

by pvliesdonk

Move Folder

move_folder
Destructive

Move an entire folder subtree to a new location and rewrite every link in the vault that points into the moved subtree.

Instructions

Move an entire folder subtree to a new location in one call, rewriting every link across the vault that points into the moved subtree — the folder-level analogue of 'rename'.

Moves all files under old_dir (.md notes, attachments, and any other files) to the matching path under new_dir, preserving structure. Links between documents inside the subtree and backlinks from outside are all rewritten. Link rewrites wait for prior index writes. The move queues an index refresh; no reindex is needed.

The move is atomic at the gate: if any destination file already exists, the call fails before moving anything. Link rewrites are best-effort — a source that cannot be rewritten is reported in failed_links rather than aborting the move. Note: an OS error during the move phase itself (permission error, full disk, concurrent file removal) can leave the subtree partially moved with the index unchanged; call 'reindex' to reconcile the index with the on-disk state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_dirYesRelative target folder prefix (e.g. "archive/2026"). May be an existing folder — files merge in; a per-file name clash aborts the whole move.
old_dirYesRelative source folder prefix (e.g. "drafts").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses the atomic gate (fails if destination exists), best-effort link rewrites with failed_links reporting, and the risk of partial moves on OS errors with a recommendation to reindex. This goes well beyond the destructiveHint annotation, providing rich behavioral context.

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?

The description is lengthy but every sentence carries essential information about failure modes, link rewriting, and recovery. It is front-loaded with the core purpose and avoids fluff, though it could be tightened slightly.

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?

For a complex recursive move with link rewriting, the description covers the atomic gate, best-effort rewrites, failure reporting, and recovery via reindex. Nothing essential for correct invocation is missing, and the output schema is referenced via failed_links.

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

Parameters4/5

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

Schema already covers both parameters at 100%, but the description adds meaning by explaining old_dir/new_dir as relative prefixes, describing merge behavior into existing folders, and noting that a name clash aborts the move. This adds value beyond the schema descriptions.

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?

Clearly states the tool moves an entire folder subtree in one call and rewrites all links into the moved subtree, explicitly positioning itself as the folder-level analogue of rename. This distinguishes it from sibling rename and other tools.

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

Usage Guidelines4/5

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

It identifies itself as the folder-level analogue of rename, implying use for moving folders with link rewriting. However, it does not explicitly state when not to use it or name alternatives (e.g., rename, write), leaving the selection context somewhat implicit rather than explicit.

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