Skip to main content
Glama

write_file

Write or update a Markdown note with YAML metadata, optionally preserving existing body via content lock. Validates parent links and syncs metadata before saving.

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.
Behavior5/5

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

With no annotations, the description fully discloses destructive behavior: 'This is a destructive write: it replaces the complete file, unless content_lock=true...' and details validation steps (parent link cycle check, sync, index refresh).

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 concise with 5 sentences, each adding value. It is front-loaded with purpose, followed by usage guidelines and behavioral details, without redundancy.

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?

The description covers purpose, usage, behavior, and parameters well. However, it does not mention what the tool returns (e.g., success indicator or the written note), which would be helpful for an agent. Since no output schema exists, this is a minor gap.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds context beyond schema, such as explaining content_lock behavior and mentioning that parent links are validated and synced. This enriches understanding.

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 'Create or replace one Markdown note with YAML metadata,' using specific verb and resource. It distinguishes from siblings by mentioning when to use this tool vs read_file or 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 says 'Use it when an agent has an explicit final content body and metadata to save.' Also advises 'Use read_file first for existing notes and suggest_metadata first when you want classification hints,' providing clear alternatives.

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

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