Skip to main content
Glama
mursilsayed

trilium-bolt

by mursilsayed

patch_note

Find and replace specific text in a Trilium note without rewriting the entire content. Specify occurrence to disambiguate multiple matches, ensuring precise edits.

Instructions

Find-and-replace a piece of a note's content without resending the whole note. Rejects the call if "search" matches zero or more than one location, unless "occurrence" is given to disambiguate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteIdYesID of the note to patch
searchYesLiteral text (or regex pattern, if isRegex is true) to find in the note content
isRegexNoTreat "search" as a regular expression instead of literal text (default: false)
replaceYesText to replace the match with
occurrenceNo1-based index of the match to replace. Required when "search" matches more than one location.
contentFormatNoFormat "search" and "replace" are expressed in: "markdown" (default, matches what get_note returns) or "html" (the raw stored format)markdown
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden, and it does well by revealing a key operational rule: the call is rejected when the search text matches zero or multiple locations unless occurrence disambiguates. It also signals that only a piece is modified rather than the whole note. Minor omissions such as return value and persistence details are not stated, but the most important edge-case behavior is covered.

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?

The description is concise and well-structured: the first sentence states the operation and its advantage, the second states the critical matching and disambiguation rule. There is no filler, repetition, or unnecessary schema detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with six parameters, the schema plus description gives enough information to invoke it correctly: required fields, regex behavior, content format, and ambiguity rejection are all clear. The main gap is the lack of an output schema or description of what a successful patch returns, but this is a minor omission for a tool whose primary action is a state change.

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%, so all six parameters already carry detailed meanings in the input schema. The description adds framing around search and occurrence but does not supply substantial new parameter-level semantics beyond what the schema already provides.

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?

The description names a concrete operation ('find-and-replace') on a specific resource ('a note's content') and explicitly contrasts it with resending the whole note, which distinguishes it from the sibling update_note. The verb is specific and the scope is unambiguous.

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 first sentence establishes the intended use case: make a targeted edit to one part of a note without replacing the entire note. This gives clear context for when patch_note is preferable to a full-update tool, though it does not explicitly name alternatives or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mursilsayed/trilium-bolt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server