TriliumNext Notes' MCP Server
The TriliumNext Notes' MCP Server allows you to manage notes through the Model Context Protocol with these core functions:
Search Notes: Query notes with options for fast search and including archived items
Get Note: Retrieve a specific note by ID, with option to include/exclude content
Create Note: Add new notes with specified parent, title, type, and content; supports various formats (text, code, image) with optional MIME type
Update Note: Modify existing notes by changing title and content
Delete Note: Permanently remove notes by ID
Provides tools for interacting with a Trilium Notes instance, enabling note management operations including creating, searching, retrieving, updating, and deleting notes of various types (text, code, file, image, search, book, relationMap, render).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TriliumNext Notes' MCP Serversearch for my meeting notes from last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TriliumNext Notes' MCP Server
⚠️ DISCLAIMER: This is a prototype for https://github.com/TriliumNext/Notes/issues/705. Suggested only for developer use. Please backup your Trilium notes before using this tool. ⚠️
A model context protocol server for TriliumNext Notes. This server provides tools to interact with your Trilium Notes instance through MCP. You can use this MCP with triliumnext-skills.
Also, if you would like to back up your trilium instances to multiple cloud storage providers such as cloudflare R2, AWS S3 and google drive simultaneously, please visit: https://github.com/tan-yong-sheng/trilium-backup
Alternatives to suggest:
Related MCP server: MCP TriliumNext
Quick Start
Make sure to set up your environment variables first:
TRILIUM_API_URL(default: http://localhost:8080/etapi)TRILIUM_API_TOKEN(required, get this from your Trilium Notes settings)PERMISSIONS(optional, default='READ;WRITE', where READ grants access tosearch_notes,get_note,resolve_note_id, andread_attributes, and WRITE grants access tocreate_note,update_note,delete_note, andmanage_attributes)VERBOSE(optional, default='false', which if true will print verbose debugging logs)
Installation
Below are the installation guide for this MCP on different MCP clients, such as Claude Desktop, Claude Code, Cursor, Cline, etc.
Add to your Claude Desktop configuration:
{
"mcpServers": {
"triliumnext-mcp": {
"command": "npx",
"args": ["triliumnext-mcp"],
"env": {
"TRILIUM_API_URL": "http://localhost:8080/etapi",
"TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>",
"PERMISSIONS": "READ;WRITE"
}
}
}
}claude mcp add triliumnext-mcp \
-e TRILIUM_API_URL=http://localhost:8080/etapi \
-e TRILIUM_API_TOKEN=<YOUR_TRILIUM_API_TOKEN> \
-e PERMISSIONS='READ;WRITE' \
-- npx triliumnext-mcpNote: Increase the MCP startup timeout to 1 minutes and MCP tool execution timeout to about 5 minutes by updating ~\.claude\settings.json as follows:
{
"env": {
"MCP_TIMEOUT": "60000",
"MCP_TOOL_TIMEOUT": "300000"
}
}Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server
Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.
{
"mcpServers": {
"triliumnext-mcp": {
"command": "npx",
"args": ["triliumnext-mcp"],
"env": {
"TRILIUM_API_URL": "http://localhost:8080/etapi",
"TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>",
"PERMISSIONS": "READ;WRITE"
}
}
}
}Cline uses a JSON configuration file to manage MCP servers. To integrate the provided MCP server configuration:
Open Cline and click on the MCP Servers icon in the top navigation bar.
Select the Installed tab, then click Advanced MCP Settings.
In the cline_mcp_settings.json file, add the following configuration:
(i) Using Google AI Studio Provider
{
"mcpServers": {
"timeout": 300,
"type": "stdio",
"triliumnext-mcp": {
"command": "npx",
"args": ["triliumnext-mcp"],
"env": {
"TRILIUM_API_URL": "http://localhost:8080/etapi",
"TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>",
"PERMISSIONS": "READ;WRITE"
}
}
}
}The server uses stdio transport and follows the standard MCP protocol. It can be integrated with any MCP-compatible client by running:
npx triliumnext-mcpUsing Pre-built Image from GitHub Container Registry
Pull and run the latest image:
docker pull ghcr.io/tan-yong-sheng/triliumnext-mcp:latestThen, put this configuration for your your mcp: (Note: remember to change your TRILIUM_API_URL and TRILIUM_API_TOKEN here)
{
"mcpServers": {
"triliumnext-mcp-docker": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"TRILIUM_API_URL",
"-e",
"TRILIUM_API_TOKEN",
"-e",
"PERMISSIONS",
"-e",
"VERBOSE",
"ghcr.io/tan-yong-sheng/triliumnext-mcp:latest"
],
"env": {
"TRILIUM_API_URL": "https://trilium:8080/etapi",
"TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>",
"PERMISSIONS": "READ;WRITE",
"VERBOSE": "false"
}
}
}
}Available Tools
The server provides the following tools for note management:
Search & Discovery Tools
search_notes- Unified search with comprehensive filtering capabilities including keyword search, date ranges, field-specific searches, attribute searches, note properties, template-based searches, note type filtering, MIME type filtering, and hierarchy navigation.resolve_note_id- Find a note's ID by its title. Essential for getting a note's ID to use with other tools.list_children_notes- List the direct child notes of a parent note using a deterministic search query. Returns child summaries sorted by creation date and title.
Note Management Tools
get_note- Retrieve a note and its content by ID. Can also be used with regex to extract specific patterns from the content.create_note- Create a new note. Supports 10 note types and allows creating attributes (labels and relations) in the same step.update_note- Updates a note's title or content. Requires amode('overwrite'or'append') to specify the update type and anexpectedHashto prevent conflicts.move_note- Move a note to a new parent folder. UsebranchIdonly when the note has multiple parent branches.patch_note- Apply targeted batched edits using mode-based patches (css,xpath,line,fragment,literal,regex) with atomic validation. Literal patches can useoccurrenceand optionalcontextto target repeated text.delete_note- Permanently delete a note (⚠️ cannot be undone).
Attribute Management Tools
read_attributes- Read all attributes (labels and relations) for a given note.manage_attributes- Create, update, or delete attributes on a note. Supports batch creation.
📖 Detailed Usage: See Note Management Guide for revision control strategy and best practices.
Example Queries
Search & Discovery
"Find my most recent 10 notes about 'n8n' since the beginning of 2024"
"Show me notes I've edited in the last 7 days"
"List all notes under 'n8n Template' folder, including subfolders"
"List the direct child notes of this folder"
Content Management
"Add today's update to my work log" (uses
update_notewithmode: 'append')"Replace this draft with the final version" (uses
update_notewithmode: 'overwrite')"Create a new note called 'Weekly Review' in my journal folder"
📖 More Examples: See User Query Examples for comprehensive usage scenarios.
Documentation
Docker Deployment Guide - Complete guide for running with Docker
Note Management Guide - Safe content editing with revision control
Patch Note Guide - Targeted batched note editing
Move Note Guide - Moving notes between parents
List Children Notes Guide - Direct child listing
User Query Examples - Natural language query examples
Search Query Examples - Advanced search syntax and filters
Development
If you want to contribute or modify the server:
# Clone the repository
git clone https://github.com/tan-yong-sheng/triliumnext-mcp.git
# Install dependencies
npm install
# Build the server
npm run build
# For development with auto-rebuild
npm run watchContributing
Contributions are welcome! If you are looking to improve the server, please familiarize yourself with the official Trilium Search DSL documentation and our internal Search Query Examples to understand how search queries are constructed.
Please feel free to open an issue or submit a pull request.
Available Tools
9 toolscreate_noteA
Create a new note in TriliumNext with duplicate title detection. When a note with the same title already exists in the same directory, you'll be presented with choices: skip creation, create anyway (with forceCreate: true), or update the existing note. ONLY use this tool when the user explicitly requests note creation (e.g., 'create a note', 'make a new note'). DO NOT use this tool proactively or when the user is only asking questions about their notes. TIP: For code notes, content is plain text (no HTML processing).
| Name | Required | Description | Default |
|---|---|---|---|
| parentNoteId | Yes | ID of the parent note | root |
| title | Yes | Title of the note | |
| content | No | Content of the note (optional). Content requirements by note type: TEXT notes require HTML content (plain text auto-wrapped in <p> tags, e.g., '<p>Hello world</p>', '<strong>bold</strong>'); CODE/MERMAID notes require plain text ONLY (HTML tags rejected, e.g., 'def fibonacci(n):'); ⚠️ OMIT CONTENT for: 1) FILE notes (binary content uploaded separately via fileUri parameter), 2) WEBVIEW notes (use #webViewSrc label instead), 3) Container templates (Board, Calendar, Grid View, List View, Table, Geo Map), 4) System notes: RENDER (create child HTML note with type='code' and mime='application/x-html', then link with ~renderNote relation), SEARCH (queries in search properties), RELATION_MAP (visual maps), NOTE_MAP (visual hierarchies), BOOK (container notes) - these must be EMPTY to work properly. When omitted, note will be created with empty content. | |
| type | Yes | Type of note (aligned with TriliumNext ETAPI specification). For file uploads: Use 'image' for Images (JPG/JPEG/PNG/WebP), 'file' for Documents & Audio (PDF/DOCX/MP3/WAV/M4A). Other types: 'text', 'code', 'render', 'search', 'relationMap', 'book', 'noteMap', 'mermaid', 'webView'. | |
| mime | No | MIME type for code/file/image notes. For file uploads, auto-detected from file extension when not specified. Supported: application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, audio/mpeg, audio/wav, audio/mp4, image/jpg, image/png, image/webp | |
| fileUri | No | File data source (required when type='file' or type='image'). Supports: 1) Local file path: '/path/to/document.pdf', 2) Base64 data URI: 'data:application/pdf;base64,JVBERi0xLjcK...', 3) Raw base64 string. Supports PDF, DOCX, PPTX, XLSX, CSV, MP3, WAV, M4A, JPG, JPEG, PNG, WebP formats. File will be uploaded via Trilium's two-step process: create note metadata, then upload binary content. | |
| attributes | No | Optional attributes to create with the note (labels and relations). Enables one-step note creation with metadata. Labels use #tag format (e.g., 'important', 'project'), relations connect to other notes (e.g., template relations use 'Board', 'Calendar', 'Text Snippet'). ⚠️ TEMPLATE RESTRICTIONS: Container templates (Board, Calendar, Grid View, List View, Table, Geo Map) MUST be empty notes - add content as child notes. | |
| forceCreate | No | Bypass duplicate title check and create note even if a note with the same title already exists in the same directory. Use this when you want to intentionally create duplicate notes. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and does well by describing duplicate title detection behavior with user choices (skip, forceCreate, update), content requirements for different note types, and special handling for various note types. It doesn't cover all behavioral aspects like error handling or response format, but provides substantial operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with purpose statement, behavioral details, usage guidelines, and a tip. Every sentence adds value, though it could be slightly more concise by integrating the TIP into the content requirements section. Front-loaded with core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex 8-parameter creation tool with no annotations and no output schema, the description provides substantial context about behavior, usage constraints, and content requirements. It covers the most critical aspects an agent needs to use the tool correctly, though doesn't describe return values or error cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds some context about content requirements for code notes and duplicate handling, but doesn't provide significant additional parameter semantics beyond what's in the schema. Baseline 3 is appropriate given high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'create' and resource 'note', specifies the system (TriliumNext), and mentions duplicate title detection which distinguishes it from siblings like update_note. It provides specific purpose beyond just the name.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use ('ONLY use this tool when the user explicitly requests note creation') and when not to use ('DO NOT use this tool proactively or when the user is only asking questions about their notes'). Also provides a tip about code notes, giving clear operational guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_noteA
Delete a note permanently. ONLY use this tool when the user explicitly requests note deletion (e.g., 'delete the note', 'remove this note', 'delete this permanently'). TRY NOT to use this tool proactively or for automated cleanup. CAUTION: This action cannot be undone and will permanently remove the note and all its content.
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | ID of the note to delete |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates critical behavioral traits: the action is permanent ('cannot be undone'), destructive ('permanently remove the note and all its content'), and requires explicit user intent. However, it lacks details on error handling, permissions, or rate limits, which are relevant for a destructive operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with the core purpose stated first ('Delete a note permanently'). Each sentence adds value: usage guidelines, cautionary notes, and irreversible consequences. There is no redundant or unnecessary information, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (destructive operation with no annotations or output schema), the description is mostly complete. It covers purpose, usage constraints, and behavioral risks. However, it could be more complete by mentioning potential errors (e.g., invalid noteId) or confirming deletion success, though the absence of an output schema reduces the need for return value details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the 'noteId' parameter clearly documented. The description does not add any additional meaning or context about the parameter beyond what the schema provides, such as format examples or validation rules. This meets the baseline score of 3 for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('delete permanently') and resource ('a note'), distinguishing it from siblings like 'update_note' or 'get_note'. It explicitly mentions the permanent removal of content, which sets it apart from tools that might archive or modify notes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool ('ONLY use this tool when the user explicitly requests note deletion') and when not to use it ('TRY NOT to use this tool proactively or for automated cleanup'). It includes examples of user requests (e.g., 'delete the note') to clarify the context, though it does not name specific alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_noteA
Get a note and its content by ID. Perfect for when someone wants to see what's in a note, extract specific information, or prepare for search and replace operations. Getting the full content lets you see the context and create better regex patterns for extraction or replacement. ⚠️ SMART CONTENT INCLUSION: For file/image notes, binary content is automatically excluded by default for performance. Use includeBinaryContent: true to explicitly retrieve binary data when needed.
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | ID of the note to retrieve | |
| includeContent | No | Whether to include note content (default: true). For file/image notes, this excludes binary content by default - use includeBinaryContent to retrieve binary data. | |
| includeBinaryContent | No | Whether to include binary content for file/image notes (default: false). Set to true only when you need the actual binary data (e.g., for file downloads). Otherwise, keep false for faster responses. | |
| searchPattern | No | Optional pattern to search for within the note. Use when you need to find specific text or extract information. Note: Search is not available for file/image notes unless includeBinaryContent is true. | |
| useRegex | No | Whether to use regex patterns (default: true). | |
| searchFlags | No | Search options. Defaults to 'gi' (find all matches, case-insensitive). | gi |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it retrieves note content, excludes binary content by default for performance, and allows explicit retrieval of binary data. It also hints at performance implications and search limitations for file/image notes. However, it doesn't cover error handling, rate limits, or authentication needs, which are gaps for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose. The first sentence clearly states the tool's function, and subsequent sentences add useful context without redundancy. However, the use of emojis and some verbose phrasing (e.g., 'Perfect for when someone wants to see what's in a note') slightly reduces efficiency, but overall, it remains concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (6 parameters, no annotations, no output schema), the description is moderately complete. It covers the main purpose, usage scenarios, and key behavioral traits like binary content handling. However, it lacks details on return values, error conditions, and how it differs from sibling tools, which are important gaps for an agent to use it correctly without an output schema or annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema, such as mentioning 'SMART CONTENT INCLUSION' and use cases for parameters, but it doesn't provide significant additional semantics. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate with extra insights.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get a note and its content by ID.' It specifies the verb ('Get') and resource ('note and its content'), making the function unambiguous. However, it doesn't explicitly differentiate from siblings like 'read_attributes' or 'search_notes' beyond mentioning 'extract specific information' and 'prepare for search and replace operations,' which are use cases rather than distinctions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides implied usage guidelines by listing scenarios: 'when someone wants to see what's in a note, extract specific information, or prepare for search and replace operations.' It also mentions alternatives like using 'includeBinaryContent: true' for binary data, but it doesn't explicitly state when to use this tool versus siblings such as 'search_notes' or 'read_attributes,' leaving some ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
manage_attributesA
Manage note attributes with write operations (create, update, delete). Create labels (#tags), template relations (~template), update existing attributes, and organize notes with metadata. IMPORTANT: This tool only provides write access - use read_attributes to view existing attributes. Relations require values pointing to existing notes (e.g., template relations use 'Board', 'Calendar'; author relations use target note titles or IDs). UPDATE LIMITATIONS: For labels, only value and position can be updated. For relations, only position can be updated. The isInheritable property cannot be changed via update - delete and recreate to modify inheritability. Supports single operations and efficient batch creation for better performance.
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | ID of the note to manage attributes for | |
| operation | Yes | Operation type: 'create' (new attribute), 'update' (modify existing - limited to label value/position and relation position only), 'delete' (remove attribute), 'batch_create' (multiple new attributes efficiently) | |
| attributes | No | Array of attributes to create/update/delete. Required for all write operations. IMPORTANT: Update operations have limitations - only label values/positions and relation positions can be updated. To change isInheritable or other properties, delete and recreate the attribute. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure and does so comprehensively. It reveals critical behavioral traits: write-only access, update limitations (only label value/position and relation position can be updated), the immutable nature of isInheritable property, requirements for relation values (must point to existing notes), and performance considerations for batch operations. This goes well beyond what the input schema provides about constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded with the core purpose and key limitation (write-only access). Each sentence adds value: distinguishing from read operations, explaining attribute types, detailing update limitations, and mentioning performance benefits. While comprehensive, it remains focused without unnecessary repetition or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex mutation tool with 3 parameters, 100% schema coverage, but no annotations or output schema, the description provides substantial context about behavioral constraints, usage patterns, and limitations. It covers the tool's scope, update restrictions, relation requirements, and performance considerations. The main gap is the lack of information about return values or error conditions, but given the comprehensive behavioral disclosure, this is a minor omission.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the baseline is 3. The description adds meaningful context about parameter usage: it explains the purpose of different attribute types (labels for #tags, relations for ~connections), provides concrete examples of name values ('status', 'priority', 'template', 'author'), and clarifies value requirements for relations. However, it doesn't add significant semantic information beyond what's already well-documented in the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('manage', 'create', 'update', 'delete') and resources ('note attributes'), and distinguishes it from the sibling tool 'read_attributes' by explicitly stating this is for write operations only. The description provides concrete examples of what can be managed (labels, template relations) and how they're used.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool versus alternatives: it states 'use read_attributes to view existing attributes' and mentions 'efficient batch creation for better performance' as a performance consideration. It also specifies that this tool 'only provides write access,' clearly delineating its scope from read operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_attributesA
Read all attributes (labels and relations) for a note. View existing labels (#tags), template relations (~template), and note metadata. This tool provides read-only access to inspect current attributes assigned to any note. Returns structured data with labels, relations, and summary information.
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | ID of the note to read attributes from |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states 'read-only access' (safety profile), describes what gets returned ('structured data with labels, relations, and summary information'), and specifies the scope ('all attributes'). It doesn't mention error conditions or performance characteristics, but provides solid behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with zero waste. First sentence states purpose and scope, second clarifies access type, third describes return format. Every sentence adds value and the description is appropriately sized for a single-parameter read tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read operation with no annotations and no output schema, the description provides good coverage: purpose, scope, safety profile, and return format. It could benefit from mentioning what happens with invalid note IDs or whether it returns empty results for notes without attributes, but overall it's quite complete for this complexity level.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents the single 'noteId' parameter. The description doesn't add any parameter-specific information beyond what's in the schema, but doesn't need to since schema coverage is complete. Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Read all attributes'), the resource ('for a note'), and what it returns ('labels and relations'). It distinguishes from siblings like 'get_note' by focusing specifically on attributes rather than the full note content, and from 'manage_attributes' by being read-only.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use it ('to inspect current attributes assigned to any note') and implicitly distinguishes it from write operations. However, it doesn't explicitly state when NOT to use it or name specific alternatives like 'get_note' for full note content versus just attributes.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
resolve_note_idA
Resolves a note/folder name to its actual note ID for use with other tools. You MUST call this function when users provide note names instead of note IDs (e.g., 'wqd7006', 'My Project') UNLESS the user explicitly provides a note ID. Simple title-based search with user choice when multiple matches found.
| Name | Required | Description | Default |
|---|---|---|---|
| noteName | Yes | Name or title of the note to find (e.g., 'wqd7006', 'My Project Folder') | |
| exactMatch | No | Whether to require exact title match. RECOMMENDED: Use false (default) for best user experience - fuzzy search finds partial matches and handles typos, while still prioritizing exact matches when found. Only set to true when user explicitly requests exact matching. | |
| maxResults | No | Maximum number of results to return in topMatches array (default: 10) | |
| autoSelect | No | When multiple matches found: true = auto-select best match (current behavior), false = stop and ask user to choose from alternatives (default: false for better user experience) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: 'Simple title-based search with user choice when multiple matches found' and mentions fuzzy search capabilities in the parameter context. However, it doesn't address potential failure modes or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured in two sentences: the first states the core purpose, the second provides usage rules and behavioral context. Every element serves a clear purpose with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a lookup tool with no annotations and no output schema, the description provides good context about purpose, usage rules, and basic behavior. However, without an output schema, it doesn't describe what format the resolved ID will be returned in or what happens when no matches are found.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add significant parameter semantics beyond what's in the schema, though it reinforces the noteName parameter's purpose. Baseline 3 is appropriate when schema coverage is complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific purpose: 'Resolves a note/folder name to its actual note ID for use with other tools.' It distinguishes this from sibling tools like get_note or search_notes by emphasizing the ID resolution function rather than content retrieval or general search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit guidance is provided: 'You MUST call this function when users provide note names instead of note IDs... UNLESS the user explicitly provides a note ID.' This creates clear when-to-use rules and distinguishes it from tools that work directly with IDs.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_and_replace_noteA
Search and replace content within a single note. When someone wants to replace text in a note, first call get_note to get the current content and hash, then use this function to make the changes. This ensures you're working with the latest version of their note.
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | ID of the note to perform search and replace on | |
| searchPattern | Yes | What to search for in the note. | |
| replacePattern | Yes | What to replace it with. For regex: supports patterns like '$1' for captured groups. | |
| useRegex | No | Whether to use regex patterns (default: true). | |
| searchFlags | No | Search options. Defaults to 'gi' (global, case-insensitive). Remove 'i' for exact case matching. | gi |
| expectedHash | Yes | ⚠️ REQUIRED: Content hash from get_note response. Always get the note content first to obtain this hash. | |
| revision | No | Whether to create a backup before replacing (default: true for safety). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the mutation nature of the operation ('replace content'), specifies a safety mechanism ('create a backup before replacing' via the revision parameter), and outlines a concurrency control requirement ('expectedHash' to ensure working with the latest version). However, it doesn't mention potential error conditions or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise with two sentences that each serve distinct purposes: the first states the core functionality, and the second provides critical workflow guidance. There's no redundancy or unnecessary elaboration, and the information is front-loaded with the most important details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with 7 parameters, no annotations, and no output schema, the description does well by explaining the core operation, safety considerations, and required workflow. However, it doesn't describe what the tool returns or potential error cases, leaving some gaps in understanding the complete interaction context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the baseline is 3. The description adds some context about the 'expectedHash' parameter ('Content hash from get_note response') and implies the workflow relationship, but doesn't provide additional semantic meaning beyond what's already documented in the comprehensive schema descriptions for all 7 parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the specific action ('search and replace content within a single note'), clearly identifying both the verb and resource. It distinguishes from siblings like 'update_note' by focusing on text replacement rather than general updates, and from 'search_notes' by operating on content within a single note rather than searching across notes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool ('When someone wants to replace text in a note') and includes a clear prerequisite workflow ('first call get_note to get the current content and hash, then use this function'). It also distinguishes from alternatives by specifying this is for content replacement within a single note, not for other note operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_notesA
Unified search with comprehensive filtering capabilities including keyword search, date ranges, field-specific searches, attribute searches, note properties, template-based searches, note type filtering, MIME type filtering, and hierarchy navigation through unified searchCriteria structure. For simple keyword searches, use the 'text' parameter. For complex boolean logic like 'docker OR kubernetes', use searchCriteria with proper OR logic. For template search: use relation type with 'template.title' property and built-in template values like 'Calendar', 'Board', 'Text Snippet', 'Grid View', 'List View', 'Table', 'Geo Map'. For note type search: use noteProperty type with 'type' property and values from the 9 supported ETAPI types: 'text', 'code', 'render', 'search', 'relationMap', 'book', 'noteMap', 'mermaid', 'webView'. For MIME type search: use noteProperty type with 'mime' property and MIME values like 'text/javascript', 'text/x-python', 'text/vnd.mermaid', 'application/json'. Use hierarchy properties like 'parents.noteId', 'children.noteId', or 'ancestors.noteId' for navigation.
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | SIMPLE keyword search ONLY - single terms or exact phrases. Examples: 'kubernetes' (finds notes containing 'kubernetes'), 'machine learning' (finds notes containing both 'machine' AND 'learning' together), '"docker kubernetes"' (finds notes containing the exact phrase 'docker kubernetes'). ⚠️ WARNING: This parameter does NOT support boolean operators like OR, AND, NOT. If you use 'docker OR kubernetes', it will search for the literal text 'docker OR kubernetes' and return no results. For any boolean logic (OR, AND, NOT), you MUST use searchCriteria parameter instead. | |
| searchCriteria | No | Unified search criteria array that supports all search types with complete boolean logic. Enables cross-type OR operations (e.g., 'relation OR dateCreated' searches). Supports labels, relations, note properties (including hierarchy navigation: parents.title, children.title, ancestors.title), note type filtering, MIME type filtering, and keyword searches. For keyword searches: use noteProperty type with 'title' or 'content' properties. Operators include existence checks (exists, not_exists), comparisons (=, !=, >=, <=, >, <), and text matching (contains, starts_with, ends_with, regex). Use OR logic between items for 'either/or' searches across ANY criteria types. Examples: Find mermaid diagrams by setting type property to 'mermaid'. Find JavaScript code by combining type 'code' with mime 'text/javascript'. Find mermaid notes by using OR logic between type criteria. Logic parameter connects current item to next item. | |
| limit | No | Maximum number of results to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description carries full burden. It effectively describes the tool's behavioral traits: it's a read-only search operation (implied by 'search'), supports comprehensive filtering, handles boolean logic, and includes hierarchy navigation. However, it doesn't mention rate limits, authentication requirements, or pagination behavior, which would be helpful for a search tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is overly verbose and poorly structured. It's a single dense paragraph mixing high-level purpose with detailed parameter usage examples. Important guidance is buried in the middle rather than front-loaded. While informative, it could be much more concise and better organized for quick comprehension.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool with no annotations and no output schema, the description does a good job explaining what the tool does and how to use it. It covers the main functionality, parameter usage, and provides concrete examples. However, it lacks information about result format, pagination, error handling, or performance characteristics that would be useful for a comprehensive search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the baseline is 3. The description adds some value by explaining when to use 'text' vs 'searchCriteria' parameters and providing examples of template values, note types, and MIME types. However, it doesn't significantly enhance parameter understanding beyond what's already well-documented in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as 'Unified search with comprehensive filtering capabilities' and lists specific search types (keyword, date ranges, field-specific, etc.). It distinguishes from siblings by focusing on search functionality rather than CRUD operations like create_note, delete_note, or update_note.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use different parameters: 'For simple keyword searches, use the 'text' parameter. For complex boolean logic... use searchCriteria.' It also gives specific examples for template searches, note type searches, and MIME type searches, clearly indicating appropriate usage scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_noteA
Update note with support for title-only updates, content overwrite, content append, or file replacement. ⚠️ REQUIRED: ALWAYS call get_note first to obtain current hash. ⚠️ SIMPLER RULES: Note type and MIME type are IMMUTABLE - cannot be changed after creation. MODE SELECTION: Use 'append' when user wants to add/insert content (e.g., 'append to note', 'add to the end', 'insert content', 'add more content', 'continue writing', 'add to bottom'). Use 'overwrite' when replacing entire content (e.g., 'replace content', 'overwrite note', 'update the whole note', 'completely replace'). TITLE-ONLY: Efficient title changes without content modification. FILE UPDATES: Replace file content only with SAME file type (image→image, file→file). To change file types, create a new note instead. PREVENTS: Type mismatches, file type conflicts, and overwriting changes made by other users. ONLY use when user explicitly requests note update. WORKFLOW: get_note → review content → update_note with returned hash
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | ID of the note to update | |
| title | No | New title for the note. If provided alone (without content), performs efficient title-only update without affecting note content or blobId. | |
| content | No | Content of the note. Content requirements by note type: TEXT notes require HTML content (plain text auto-wrapped in <p> tags, e.g., '<p>Hello world</p>', '<strong>bold</strong>'); CODE/MERMAID notes require plain text ONLY (HTML tags rejected, e.g., 'def fibonacci(n):'); ⚠️ SYSTEM NOTES MUST REMAIN EMPTY: RENDER (HTML handled by note type), SEARCH (queries in search properties), RELATION_MAP (visual maps), NOTE_MAP (visual hierarchies), BOOK (container notes), WEBVIEW (use #webViewSrc label); IMPORTANT: When updating notes with template relations (Board, Calendar, Grid View, List View, Table, Geo Map), the note must remain EMPTY - these templates provide specialized layouts and content should be added as child notes instead. | |
| fileUri | No | File data source for file/image note updates. Replaces the existing file content with new file data. ⚠️ FILE TYPE MUST MATCH: The new file must have the same type as the current note (image files for image notes, other files for file notes). Supports: 1) Local file path: '/path/to/new_document.pdf', 2) Base64 data URI: 'data:application/pdf;base64,JVBERi0xLjcK...', 3) Raw base64 string. To change file types, create a new note instead. | |
| expectedHash | Yes | ⚠️ REQUIRED: Blob ID (content hash) from get_note response. This is Trilium's built-in content identifier that ensures data integrity by verifying the note hasn't been modified since you retrieved it. If you see an error about missing blobId, you MUST call get_note first to get the current blobId. | |
| revision | No | Whether to create a revision before updating (default: true for safety, title-only updates skip revision for efficiency) | |
| mode | No | Content update mode. REQUIRED when updating content for text/code notes, optional for file-only updates. CRITICAL: Choose based on user intent: 'append' = add/insert content while preserving existing content (use for 'add to', 'append', 'insert', 'add more', 'continue writing'); 'overwrite' = completely replace all existing content (use for 'replace', 'overwrite', 'update all', 'completely replace'). Default behavior is not available - you MUST explicitly choose when updating content. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and delivers comprehensive behavioral disclosure. It explains immutability constraints (note type and MIME type), concurrency protection (expectedHash prevents overwriting other users' changes), mode selection logic, file type matching requirements, revision behavior, and workflow prerequisites. No contradictions exist since annotations are absent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately front-loaded with core functionality and warnings, but it's lengthy due to necessary detail for a complex tool. Every sentence earns its place by providing critical guidance (e.g., mode selection rules, immutability constraints, workflow steps). Some redundancy exists (e.g., multiple warnings about get_note), but overall structure supports clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex mutation tool with 7 parameters, no annotations, and no output schema, the description provides exceptional completeness. It covers prerequisites (get_note), constraints (immutable types, file matching), behavioral nuances (revision defaults, mode selection), error prevention (hash verification), and alternatives (create_note for type changes). No significant gaps remain given the context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds significant value by explaining parameter interactions and semantics: it clarifies when to use title-only updates, distinguishes between append/overwrite modes with user intent examples, explains fileUri constraints, and emphasizes the critical role of expectedHash. However, it doesn't fully detail all 7 parameters' nuances beyond what the schema already covers well.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'update' with the resource 'note' and specifies multiple update types (title-only, content overwrite, content append, file replacement). It distinguishes from siblings by focusing on updates rather than creation (create_note), deletion (delete_note), or retrieval (get_note).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit guidance is provided on when to use this tool vs alternatives: 'ALWAYS call get_note first to obtain current hash', 'To change file types, create a new note instead', 'ONLY use when user explicitly requests note update'. It also distinguishes from sibling tools by outlining a specific workflow (get_note → review content → update_note).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
9 tool updates
v1.0.0- Added
create_note - Added
delete_note - Added
get_note - Added
manage_attributes - Added
read_attributes - Added
resolve_note_id - Added
search_and_replace_note - Added
search_notes - Added
update_note
5 tool updates
- Removed
create_note - Removed
delete_note - Removed
get_note - Removed
search_notes - Removed
update_note
5 tool updates
- First observed
create_note - First observed
delete_note - First observed
get_note - First observed
search_notes - First observed
update_note
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose with no ambiguity. For example, create_note, delete_note, get_note, update_note cover the CRUD lifecycle distinctly, while manage_attributes and read_attributes separate write and read operations cleanly. Tools like resolve_note_id and search_notes serve unique auxiliary functions without overlap.
All tool names follow a consistent verb_noun pattern with snake_case throughout, such as create_note, delete_note, get_note, update_note, manage_attributes, read_attributes, resolve_note_id, search_and_replace_note, and search_notes. This uniformity makes the set predictable and easy to understand.
With 9 tools, the count is well-scoped for a notes management server, covering core operations like CRUD, attribute handling, search, and ID resolution. Each tool earns its place without redundancy, providing a comprehensive yet manageable interface for the domain.
The tool set offers complete coverage for note management, including full CRUD (create_note, get_note, update_note, delete_note), attribute management (manage_attributes, read_attributes), search capabilities (search_notes, search_and_replace_note), and auxiliary functions (resolve_note_id). There are no obvious gaps, enabling agents to handle all typical workflows without dead ends.
Maintenance
Related MCP Connectors
Model Context Protocol server for todo.vu task management and time tracking.
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseCqualityDmaintenanceA Model Context Protocol server that implements a simple notes system, allowing users to create, list, and summarize text notes.32 npmISC
- FlicenseBqualityDmaintenanceA Model Context Protocol server enabling AI assistants to interact with TriliumNext notes, providing tools for creating, searching, reading, and updating notes in your knowledge base.42-
- FlicenseBqualityDmaintenanceA simple server for saving, listing, and searching notes persisted to a local JSON file. It enables users to manage their personal notes using natural language via the Model Context Protocol.3-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for managing text notes, with resources (note:// URIs), tools (create_note), and prompts (summarize_notes).-