Skip to main content
Glama
pvliesdonk

markdown-vault-mcp

by pvliesdonk

Write Note

write
Idempotent

Create or overwrite Markdown notes or binary attachments in a vault, with optional frontmatter and automatic parent directories. Use for new files or full replacements; targeted changes require edit.

Instructions

Create or overwrite a document or attachment.

For .md documents: uses 'content' (markdown body) and optional 'frontmatter'. WARNING: replaces the entire file — use 'edit' for targeted changes. The index refresh is queued; no reindex is needed.

For attachments (pdf, png, etc.): uses 'content_base64' (base64- encoded binary). 'content' and 'frontmatter' are ignored. Parent directories are created automatically for both.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path (e.g. "Journal/note.md" or "assets/photo.png"). Extension determines handling.
contentNoFull markdown body for .md files (excluding frontmatter). Ignored for attachments.
if_matchNoEtag from 'read'; required by default to replace an existing file. A stale etag refuses the write. Omit for new files.
frontmatterNoOptional YAML frontmatter dict for .md files, e.g. {"title": "My Note", "tags": ["draft"]}. Ignored for attachments.
content_base64NoBase64-encoded binary content for attachment files. Required when path is not ``.md``. **Context cost:** base64 encoding inflates by ~33%; even a 1 MB attachment becomes ~1.3 MB of tokens.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv5.0.0
    • changedInput schema / properties / if_match / description
      Previous value: -"Optional etag obtained from a previous 'read' call.\nWhen provided, the write only proceeds if the file has not\nbeen modified since that read (optimistic concurrency).\nOmit to write unconditionally."New value: +"Etag from 'read'; required by default to replace an\nexisting file. A stale etag refuses the write. Omit for new files."
  2. Addedv4.0.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false. The description adds important behavioral context: it warns that the entire file is replaced, explains that the index refresh is queued (no reindex needed), and notes that 'content' and 'frontmatter' are ignored for attachments. It also discloses the base64 token cost. This goes beyond the annotations and provides meaningful behavioral transparency.

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 well-structured with clear sections for .md documents and attachments. It front-loads the core purpose, then provides conditional details. Every sentence adds value: the warning about file replacement, the index refresh note, the base64 cost warning, and the parent directory behavior. No wasted words.

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?

The description is complete for a write tool with an output schema. It covers the two main use cases (markdown and attachments), explains the overwrite behavior, the etag requirement (via schema), the index refresh behavior, and the base64 cost. The output schema exists, so return values don't need to be described. Nothing critical is missing for an agent to call this correctly.

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 description coverage is 100%, so the schema already documents all parameters. The description adds value by explaining the relationship between parameters (e.g., 'content' vs 'content_base64' based on file extension, 'frontmatter' ignored for attachments) and by warning about the base64 token inflation. This is more than the schema alone provides, though the schema already does heavy lifting.

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 clearly states the tool's function: 'Create or overwrite a document or attachment.' It distinguishes between .md documents and attachments, and explicitly names the sibling 'edit' for targeted changes, which differentiates it from the write operation. The verb 'write' plus the resource types (document/attachment) makes the purpose unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: it says to use 'edit' for targeted changes, and explains when 'content' vs 'content_base64' is used. It also notes that parent directories are created automatically, which is a useful prerequisite. This is clear context for when to use this tool vs alternatives.

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