Skip to main content
Glama

Edit a note

ragdown_edit
Destructive

Update or create Markdown notes with conflict protection: replace a file only after reading it, or append text to a note or section without overwriting existing content.

Instructions

Change an existing note, or create one at a path you choose. By default text replaces the whole file (frontmatter included), which for an existing note needs base_hash: the hash ragdown_read_doc returned, so you never overwrite a version you have not read. append: true adds text at the end of the note, or with heading at the end of that section, leaving the rest as it is. If the file changed since base_hash, nothing is written: read it again and redo the edit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath of a Markdown file relative to the notes root, e.g. 'projects/alpha.md'
textYesThe note's new Markdown, or with append, what to add
appendNo
headingNoWith append: add to the end of the section under this heading
base_hashNoThe hash from ragdown_read_doc; required to replace an existing note

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.9.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations' destructiveHint, the description reveals crucial behavior: whole-file replacement including frontmatter, the hash-based optimistic concurrency lock, append semantics, heading-scoped appending, and the silent no-write outcome when the file changed. This goes well beyond what the annotations alone convey.

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?

Three dense sentences front-load the core action, then add necessary safety and append semantics without redundancy. Every clause earns its place, and the most important constraint (whole-file replacement + base_hash) appears early.

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?

For a destructive write tool with 5 parameters and no output schema, the description covers the main path, the append variant, the heading variant, the concurrency failure mode, and the recovery instruction. An agent has enough to call the tool correctly and handle the non-success case.

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 80%, so the baseline is 3, but the description adds real meaning to base_hash, append, and heading: it explains why base_hash is required (to avoid overwriting unread versions) and exactly how append/heading modify behavior. This exceeds the schema's bare field definitions.

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: 'Change an existing note, or create one at a path you choose.' It clearly distinguishes the tool's write/update role from sibling read-oriented tools like ragdown_read_doc and ragdown_list.

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 clear operational context: creating vs editing, when base_hash is required, when append is appropriate, and the failure-fallback instruction to 'read it again and redo the edit.' It does not explicitly contrast against other write-adjacent siblings, but the usage conditions are concrete enough for an agent to decide correctly.

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