Rename Note
renameMove or relocate Markdown notes and attachments, updating links in other notes to keep references intact. Supports optional concurrency checks to prevent overwriting changes.
Instructions
Rename or move a document or attachment. When renaming a .md note, always pass update_links=True to rewrite links in other documents that point to the old path.
For .md documents: link rewrites wait for prior index writes. The move queues another index refresh; no reindex is needed. For attachments: only the file is moved; update_links does not apply (attachment references are not tracked as links). Parent directories are created automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| if_match | No | Optional etag obtained from a previous 'read' call for old_path. When provided, the rename only proceeds if the file has not been modified since that read (optimistic concurrency). Omit to rename unconditionally. | |
| new_path | Yes | Target relative path (e.g. "projects/idea.md" or "assets/new.png"). Fails if new_path already exists. | |
| old_path | Yes | Current relative path (e.g. "drafts/idea.md" or "assets/old.png"). | |
| update_links | No | When True, all .md documents that link to old_path are also updated so their links point to new_path. Replacement is best-effort — failures are logged but do not prevent the rename. Default False; set True whenever renaming a .md note (omitting this leaves backlinks pointing to the old path). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||