Skip to main content
Glama
triliumnext-mcp

triliumnext-mcp

by perfectra1n

Delete or restore note

delete_note
Destructive

Soft-delete or restore a Trilium note and any child notes without another parent; clones elsewhere stay intact.

Instructions

Delete (soft) or restore a note. Deleting removes the note and every child that has no other parent; clones elsewhere survive. Restore with action="undelete".

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": {
      "noteId": "<noteId>",
      "action": "<action>"
    },
    "name": "delete_note"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes"delete" soft-deletes the note and all its branches; children with no other parent are deleted with it (the whole subtree), while clones placed elsewhere survive. "undelete" restores a deleted note (needs at least one non-deleted parent); find deleted notes with get_note_history.
noteIdYesID of the note

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • changedInput schema / properties / action / description
      Previous value: -"\"delete\" removes the note (and all branches pointing to it). \"undelete\" restores a previously-deleted note (requires at least one undeleted parent). Use get_note_history to find deleted notes."New value: +"\"delete\" soft-deletes the note and all its branches; children with no other parent are deleted with it (the whole subtree), while clones placed elsewhere survive. \"undelete\" restores a deleted note (needs at least one non-deleted parent); find deleted notes with get_note_history."
    • addedInput schema / properties / noteId / maxLength
      Added value: +128
    • addedInput schema / properties / noteId / pattern
      Added value: +"^[A-Za-z0-9_]+$"
  2. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but they cannot convey that the delete is *soft* and therefore recoverable — the description does. It also discloses the exact cascade rule (every child with no other parent is removed, clones elsewhere survive), which is precisely the kind of blast-radius detail an agent needs before invoking a destructive tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences, front-loaded with the verb and the destructive caveat, then the restore path. Every clause earns its place and no wording is wasted.

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 two-parameter, no-output-schema tool with full schema coverage and annotations, nothing an agent needs is missing: the safety profile comes from annotations, the cascade semantics from the description, and per-value parameter detail from the schema.

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

Parameters3/5

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

Schema description coverage is 100%, and the enum values already carry detailed per-value semantics, so the description's 'Restore with action="undelete"' is largely redundant. Baseline 3 applies — the schema, not the description, does the parameter work here.

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 — 'Delete (soft) or restore a note' — and immediately clarifies the two modes with the exact parameter value used for restore. An agent can tell this apart from delete_attachment or create_note without opening the schema.

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?

The description names both modes and specifies the trigger for the restore path (action="undelete"), which is real when-to-use guidance. It does not, however, mention sibling alternatives for note deletion vs attachment deletion, nor does it warn that a restore requires a non-deleted parent (that detail lives only in the schema).

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