Rename Note
renameMove a document or attachment to a new path, updating cross-document links for .md notes to prevent broken references.
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 — omitting this leaves those links broken.
For .md documents: the file and its search index entries are updated immediately — do not call 'reindex' afterward. For attachments: only the file is moved (no index update needed). Parent directories for new_path 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 | |||