Skip to main content
Glama

write_note

Destructive

Create or atomically overwrite a note in a vault, using a SHA-256 check to prevent overwriting changed content. Refreshes frontmatter date if present.

Instructions

Create or atomically overwrite a note (vault-root-relative path). Pass sha256 from a prior read/write as expected_sha256 to prevent overwriting a changed note. Refreshes the frontmatter updated: date (inserted when a frontmatter block exists without one); notes without a frontmatter block stay that way.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesVault-root-relative note path
vaultYesVault name
contentYesFull new note content
expected_sha256NoSHA-256 from a prior read/write; rejects stale writes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and readOnlyHint=false, so the safety profile is covered. The description adds genuinely non-redundant behavior: it refreshes the frontmatter `updated:` date and intentionally leaves notes without a frontmatter block untouched, plus the stale-write rejection semantics.

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 tight sentences, front-loaded with the core action, followed by concurrency and side-effect details in priority order. No filler or repetition.

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

Completeness4/5

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

No output schema exists, and the description adequately covers the mutation semantics, concurrency control, and frontmatter side effect. Return value expectations and path validation behavior are the only modest gaps for a destructive write tool.

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 description coverage is 100%, so all four parameters are already documented in the schema, including expected_sha256's stale-write purpose. The description restates the sha256 usage but adds no syntax or format detail beyond it, so the baseline 3 applies.

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 pair ('create or atomically overwrite') and resource ('note'), plus the path convention (vault-root-relative). The 'atomically overwrite' phrasing distinguishes it from the sibling append_note without ambiguity.

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?

Explicitly tells the agent when to pass expected_sha256 (from a prior read/write, to prevent overwriting a changed note), which is actionable usage guidance. It stops short of naming append_note or stating when not to use this tool, so not a 5.

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