Skip to main content
Glama

Write File

write_file
Destructive

Create or replace a Markdown note with YAML metadata, validating parent links to avoid graph cycles. Use content_lock to preserve the existing body while updating only metadata.

Instructions

Create or replace one Markdown note with YAML metadata. Use it when an agent has an explicit final content body and metadata to save. This is a destructive write: it replaces the complete file, unless content_lock=true is used to preserve the existing body and update only metadata. Before writing, the server validates that parent links do not create graph cycles, syncs parents and parents_meta, and then refreshes the local index. Use read_file first for existing notes and suggest_metadata first when you want classification hints.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path from OBSIDIAN_ROOT
contentYesMarkdown body (without frontmatter delimiters)
metadataNoYAML frontmatter to write for the note.
content_lockNoIf true, IGNORE content param and preserve original file text. Default false.
Install Server

TDQS

A4.7/5.0
Behavior5/5

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

The description clearly discloses the destructive nature ('replaces the complete file'), explains the content_lock exception, and describes server-side side effects (cycle validation, parent syncing, index refresh). This adds significant behavioral context beyond the destructiveHint annotation.

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 three sentences with no filler: purpose first, then usage condition, then behavioral warnings and prerequites. Every sentence adds operational value.

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 complex write tool with nested objects and no output schema, the description covers the critical operational facts: destructive behavior, content_lock preservation, validation and sync side effects, and recommended sibling tools. The rich schema handles parameter details, so nothing essential is missing.

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 the schema already documents all parameters well. The description adds useful high-level context about content_lock behavior and destructive replacement, but it does not add per-parameter detail beyond the schema. Baseline 3 is appropriate.

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 states a specific verb and resource: 'Create or replace one Markdown note with YAML metadata.' It also identifies a distinguishing capability (content_lock preserves body while updating metadata) and implicitly separates it from sibling tools like update_metadata and suggest_metadata.

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?

Explicitly states when to use the tool: 'when an agent has an explicit final content body and metadata to save.' It also names alternatives: 'Use read_file first for existing notes and suggest_metadata first when you want classification hints.' This gives clear selection guidance.

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

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/Semiotronika/NOUZ-MCP'

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