Skip to main content
Glama
triliumnext-mcp

triliumnext-mcp

by perfectra1n

Organize notes

organize_note
Destructive

Reorganize 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

NameRequiredDescriptionDefault
actionYes"move" (noteId, newParentNoteId, fromParentNoteId?, prefix?), "clone" (noteId, parentNoteId, prefix?), "reorder" (parentNoteId, notePositions), "unlink" (branchId).
noteIdNoNote to move or clone.
prefixNo"move"/"clone": branch title prefix shown in the tree (e.g. "Archive:").
branchIdNo"unlink": the parent-child branch to remove.
parentNoteIdNo"clone": the additional parent to place the note under. "reorder": the parent whose children are reordered.
notePositionsNo"reorder": new positions for child branches of parentNoteId.
newParentNoteIdNo"move" only: destination parent. (clone uses parentNoteId instead.)
fromParentNoteIdNo"move" only: the parent to move the note away from. Required when the note has two or more parents besides newParentNoteId; optional otherwise.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed27 schema fields changedv0.4.0
    • changedInput schema / properties / action / description
      Previous value: -"Operation to perform. \"move\" — move a note to a new parent (fields: noteId, newParentNoteId, fromParentNoteId?, prefix?). \"clone\" — make a note appear under an additional parent (fields: noteId, parentNoteId, prefix?). \"reorder\" — change display order of children under a parent (fields: parentNoteId, notePositions[]). \"unlink\" — remove a specific parent-child branch (field: branchId). WARNING: removing a note's last branch deletes the note."New value: +"\"move\" (noteId, newParentNoteId, fromParentNoteId?, prefix?), \"clone\" (noteId, parentNoteId, prefix?), \"reorder\" (parentNoteId, notePositions), \"unlink\" (branchId)."
    • changedInput schema / properties / branchId / description
      Previous value: -"Required for \"unlink\": the branch (parent-child link) to remove."New value: +"\"unlink\": the parent-child branch to remove."
    • addedInput schema / properties / branchId / maxLength
      Added value: +128
    • addedInput schema / properties / branchId / minLength
      Added value: +1
    • addedInput schema / properties / branchId / pattern
      Added value: +"^[A-Za-z0-9_]+$"
    • changedInput schema / properties / fromParentNoteId / description
      Previous value: -"Optional for \"move\": the parent to move the note AWAY from. Required when the note is cloned (has several parents) so the right placement is moved; ignored otherwise."New value: +"\"move\" only: the parent to move the note away from. Required when the note has two or more parents besides newParentNoteId; optional otherwise."
    • addedInput schema / properties / fromParentNoteId / maxLength
      Added value: +128
    • addedInput schema / properties / fromParentNoteId / minLength
      Added value: +1
    • addedInput schema / properties / fromParentNoteId / pattern
      Added value: +"^[A-Za-z0-9_]+$"
    • changedInput schema / properties / newParentNoteId / description
      Previous value: -"Destination parent for \"move\". Use search_notes/get_note_tree to pick the right parent."New value: +"\"move\" only: destination parent. (clone uses parentNoteId instead.)"
    • addedInput schema / properties / newParentNoteId / maxLength
      Added value: +128
    • addedInput schema / properties / newParentNoteId / minLength
      Added value: +1
    • addedInput schema / properties / newParentNoteId / pattern
      Added value: +"^[A-Za-z0-9_]+$"
    • changedInput schema / properties / noteId / description
      Previous value: -"ID of the note. Required for \"move\" and \"clone\"."New value: +"Note to move or clone."
    • addedInput schema / properties / noteId / maxLength
      Added value: +128
    • addedInput schema / properties / noteId / minLength
      Added value: +1
    • addedInput schema / properties / noteId / pattern
      Added value: +"^[A-Za-z0-9_]+$"
    • changedInput schema / properties / notePositions / description
      Previous value: -"Required for \"reorder\": array of branch position updates."New value: +"\"reorder\": new positions for child branches of parentNoteId."
    • changedInput schema / properties / notePositions / items / properties / branchId / description
      Previous value: -"ID of the branch to reorder"New value: +"Child branch under parentNoteId."
    • addedInput schema / properties / notePositions / items / properties / branchId / maxLength
      Added value: +128
    • addedInput schema / properties / notePositions / items / properties / branchId / pattern
      Added value: +"^[A-Za-z0-9_]+$"
    • changedInput schema / properties / notePositions / items / properties / notePosition / description
      Previous value: -"New position (10, 20, 30...)"New value: +"New position (10, 20, 30...)."
    • changedInput schema / properties / parentNoteId / description
      Previous value: -"Parent note ID. Required for \"clone\" (destination) and \"reorder\" (owner of the ordering)."New value: +"\"clone\": the additional parent to place the note under. \"reorder\": the parent whose children are reordered."
    • addedInput schema / properties / parentNoteId / maxLength
      Added value: +128
    • addedInput schema / properties / parentNoteId / minLength
      Added value: +1
    • addedInput schema / properties / parentNoteId / pattern
      Added value: +"^[A-Za-z0-9_]+$"
    • changedInput schema / properties / prefix / description
      Previous value: -"Optional branch prefix for \"move\" and \"clone\" (e.g., \"Archive:\", \"Draft:\")."New value: +"\"move\"/\"clone\": branch title prefix shown in the tree (e.g. \"Archive:\")."
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the safety profile is known; the description goes further by disclosing the exact side effects: old placements are removed on move, a competing placement is silently removed when collapsing onto an existing parent, and unlink can delete the note entirely. It also notes that the new branch is created first and that move/clone return the note's URL at its new location. The remaining gap is minor (no mention of error behavior or what reorder returns).

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?

Front-loads the one-line purpose, then uses per-action bullets that each start with the action name, making it scannable despite the density. Some phrasing repeats schema descriptions (e.g., the fromParentNoteId condition) and the trailing sentence about branch ID sources could be tighter, but no sentence is expendable.

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?

Covers all four enum actions, all eight parameters' cross-dependencies, and the return value for the mutation actions, which is necessary since no output schema exists. For an 8-parameter tool with destructive semantics and no output schema, nothing an agent needs in order to invoke it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds selection semantics beyond the schema by tying parameter choice to tool choice ("clone uses parentNoteId instead", use clone rather than move when both placements must survive) and by spelling out the conditional requirement on fromParentNoteId. The prefix and notePosition semantics are largely already in the schema, so it does not fully exceed the schema's own documentation.

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?

States a specific verb and resource ("Reorganize the note tree") and then enumerates the four distinct operations it performs. Each action is described in a way that separates it from siblings: "unlink" is distinguished from delete_note by explaining that it deletes the note only when the last branch is removed, and move is distinguished from clone by outcome (remove old placement vs. keep both).

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

Usage Guidelines5/5

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

Gives explicit selection rules between the actions, including the non-obvious case where newParentNoteId is already a parent, with a direct instruction to use "clone" instead. It also states prerequisites for parameters (when fromParentNoteId must be supplied) and tells the agent where branch IDs come from (get_note parentBranchIds/childBranchIds, get_note_tree childBranchIds and children[].branchId), which routes to the correct sibling tools.

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