Skip to main content
Glama
mdvault-mcp
by 0xmortuex

edit_note

Replace exact text in a note, refusing ambiguous matches or edits that break frontmatter. Preview changes with dry_run, or set new_text to empty to delete matched text.

Instructions

Replace exact text in a note. old_text must match exactly once (whitespace included), or the edit is refused with the line numbers of the matches; add surrounding text to make it unique. new_text="" deletes. Line endings of the file are preserved and an edit that would make the frontmatter unparseable is refused. dry_run=true shows a diff and writes nothing.

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

Input Schema

NameRequiredDescriptionDefault
noteYes
dry_runNo
new_textYes
old_textYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so well: refusal semantics (error returns line numbers of matches), frontmatter parse safety, line-ending preservation, deletion semantics, and dry-run non-mutation are all disclosed. These are exactly the failure modes an agent needs before calling a text-mutating 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?

Four sentences, front-loaded with the core action and uniqueness rule, then deletion, safety constraints, and dry-run. Every sentence carries a distinct operational fact with no repetition.

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?

An output schema exists, so return values need not be explained. For a 4-parameter mutation tool with zero annotations and zero schema coverage, the description covers match rules, failure behavior, safety guardrails, and dry-run preview, which is complete enough to invoke correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: old_text semantics (exact match, whitespace-sensitive, uniqueness requirement), new_text semantics (empty string deletes), and dry_run behavior are all defined. Only `note` is left to inference from its self-explanatory title.

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 ('Replace exact text in a note') and the uniqueness constraint that distinguishes it from append_to_note, which is named in the sibling list. An agent knows immediately that this is a targeted string substitution, not an append or rewrite.

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?

Gives operational guidance: old_text must match exactly once, add surrounding text to make it unique, new_text="" deletes, dry_run=true previews. It does not explicitly name alternatives (e.g., append_to_note for additions) or state when to prefer create_note, but the uniqueness rule implicitly routes the agent away from this tool for non-unique edits.

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