Organize notes
organize_noteReorganize a TriliumNext note tree by moving, cloning, reordering, or unlinking notes and branches to manage placements and hierarchy.
Instructions
Reorganize the note tree. Actions:
"move": place the note under newParentNoteId and remove its old placement (the new branch is created first). If the note has several placements other than newParentNoteId, fromParentNoteId must say which to remove. If newParentNoteId is already a parent: with no other placement nothing changes; with exactly one other placement, that one is REMOVED (the note collapses onto newParentNoteId) — use "clone" instead to keep both.
"clone": add a placement under parentNoteId without removing any (same note, new branch).
"reorder": set notePosition on child branches of parentNoteId; every branch must belong to it.
"unlink": remove one branch. If it is the note's last branch, the note itself is deleted. Branch IDs come from get_note (parentBranchIds/childBranchIds) or get_note_tree (childBranchIds, children[].branchId). move and clone return the url of the note at its new location.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "organize_note"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | "move" (noteId, newParentNoteId, fromParentNoteId?, prefix?), "clone" (noteId, parentNoteId, prefix?), "reorder" (parentNoteId, notePositions), "unlink" (branchId). | |
| noteId | No | Note to move or clone. | |
| prefix | No | "move"/"clone": branch title prefix shown in the tree (e.g. "Archive:"). | |
| branchId | No | "unlink": the parent-child branch to remove. | |
| parentNoteId | No | "clone": the additional parent to place the note under. "reorder": the parent whose children are reordered. | |
| notePositions | No | "reorder": new positions for child branches of parentNoteId. | |
| newParentNoteId | No | "move" only: destination parent. (clone uses parentNoteId instead.) | |
| fromParentNoteId | No | "move" only: the parent to move the note away from. Required when the note has two or more parents besides newParentNoteId; optional otherwise. |