Skip to main content
Glama

edit_note

Performs exact find-and-replace inside a single note, like a code editor. Use it to fix or update text precisely when you need an exact, unique match or a bulk replace.

Instructions

Exact find-and-replace inside one note (like a code editor). old_text must match exactly and be unique unless replace_all is true.

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": {
      "file": "<file>",
      "old_text": "<old_text>",
      "new_text": "<new_text>"
    },
    "name": "edit_note"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesNote path ("Folder/Note.md"), path without .md, note name, alias, or [[wikilink]]
vaultNoVault name, id or folder path (see list_vaults). Default: OBSIDIAN_VAULT or the vault open in Obsidian.
new_textYes
old_textYes
replace_allNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare the write profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false). The description adds the meaningful behavioral constraint that the match must be exact and unique, implying a failure mode, but it never states what happens on no-match or ambiguous match, nor that existing content is overwritten.

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 short sentences, front-loaded with the core behavior and immediately followed by the hard constraint. Nothing is wasted and the analogy carries real information.

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

Completeness3/5

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

For a mutating tool with no output schema and only 40% schema coverage, the definition covers the critical matching rule but leaves the agent guessing about the return value, behavior on zero or multiple matches, and whether frontmatter/formatting is affected.

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 coverage is 40%, so the description needs to compensate somewhat. It adds semantics for old_text (exact match, uniqueness) and replace_all (the escape hatch from uniqueness), which is genuinely useful, but says nothing about new_text, the vault scope, or multi-line/whitespace handling.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Exact find-and-replace inside one note (like a code editor)" gives a specific verb (replace), resource (a single note) and matching semantics. It is clear what the tool does, but it does not distinguish itself from the sibling replace_in_note, whose name suggests near-identical behavior, nor from append_to_note/write_note.

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

Usage Guidelines3/5

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

The description gives a real precondition — old_text must match exactly and be unique unless replace_all is true — which tells the agent when the call will succeed. It gives no guidance on when to choose this over replace_in_note, batch_replace, append_to_note or write_note.

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

Deploy Server

Other Tools