Skip to main content
Glama
pvliesdonk

markdown-vault-mcp

by pvliesdonk

Edit Note

edit

Replace precise text or line ranges in Markdown notes using exact, scoped, or normalized matching. Retrieve the latest content first to ensure accurate changes.

Instructions

Make a targeted text replacement in an existing .md note (not supported for attachments).

Three edit modes:

  • Exact match (old_text only): pass a portion of the file as old_text — must appear exactly once. Frontmatter can be edited.

  • Line-range (line_start + line_end, no old_text): replace the specified lines with new_text. Lines are 1-based (matching 'read' output). Recommended: pass if_match for safety.

  • Scoped match (old_text + line_start/line_end): search for old_text within the line range only — useful when old_text appears multiple times in the file.

When exact match fails, a normalized comparison is attempted (Unicode NFC, dash/quote normalization, whitespace collapsing). If a unique normalized match is found, it is used and match_type='normalized' is returned.

Always call 'read' first to get the current text and line numbers. The search index is updated immediately; do not call 'reindex'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path to the document.
if_matchNoOptional etag obtained from a previous 'read' call. When provided, the edit only proceeds if the file has not been modified since that read (optimistic concurrency).
line_endNoLast line to replace (1-based, inclusive). Must be provided together with line_start.
new_textNoReplacement text. May be longer or shorter.
old_textNoText to replace. Must appear exactly once in the document or line range. Get this via 'read'. Optional when using line-range mode.
line_startNoFirst line to replace (1-based, inclusive). Must be provided together with line_end.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations only state readOnly=false, idempotent=false, destructive=false. The description adds substantial behavioral context beyond this: frontmatter is editable, line numbers are 1-based, normalized Unicode/comparison fallback may apply, match_type='normalized' can be returned, if_match provides optimistic concurrency, and the search index updates immediately. This is exactly the kind of operational detail an agent needs to avoid surprising edits.

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 detailed but efficiently structured: a one-sentence summary, a compact bulleted mode list, a normalization note, and workflow guidance. Every section earns its place, and the most important scoping information is front-loaded. Nothing is redundant with the schema or annotations.

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?

Given six parameters, three modes, normalization behavior, and concurrency control, the description is remarkably complete. It tells the agent how to select modes, how to prepare with 'read', how to stay safe with if_match, and what to expect regarding index updates. An output schema exists, so it is acceptable that return details are not spelled out in the description.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds real value by organizing old_text, line_start, line_end, and new_text into three named modes and explaining valid combinations, uniqueness constraints, and safety recommendations. It does not merely restate the schema; it clarifies how the parameters interact, which is meaningful beyond the property-level descriptions.

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 opens with a specific verb and resource: 'Make a targeted text replacement in an existing .md note.' It clearly distinguishes this from sibling tools by noting it applies to existing notes, not attachments, and by defining three concrete replacement modes. An agent can immediately tell this is the in-place modification tool rather than write, append, or delete.

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 gives explicit mode-selection guidance: exact match when text appears once, line-range for replacing by line numbers, and scoped match when old_text appears multiple times. It also says to call 'read' first and not to call 'reindex.' However, it does not explicitly contrast this tool with write/append/delete for creation or additive changes, so the broader sibling-tool selection guidance is slightly implicit.

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/pvliesdonk/markdown-vault-mcp'

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