Skip to main content
Glama

vault_write

Write markdown content to a project vault section or create a new file with auto-generated frontmatter.

Instructions

Write to the vault: append, replace a section, or create a new file.

Modes:

  • append/replace: Update a project section. Requires section.

  • create: Create a new file with auto-generated frontmatter. Requires path; doc_type defaults to "note". Inferred automatically when you pass a path with no section, so operation may be omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesProject slug or '_meta' for cross-project content.
contentYesMarkdown content to write (body only for create mode).
operationNo'append', 'replace', or 'create'. Default 'append'. 'create' is inferred when path is set and section is empty.append
sectionNoSection shortcut (context, tasks, roadmap, lessons). For append/replace.
pathNoRelative path for the file. Setting this with no section creates the file (create mode).
doc_typeNoDocument type for frontmatter (create mode). Optional; defaults to "note".
commitNoIf True (default), auto-commit to git. If False, write to disk but leave the file dirty so the caller can batch many writes into one commit via the ``vault_commit`` tool, or let obsidian-git's auto-commit pick it up. Durability contract: files are persisted to disk regardless; only the *commit* is deferred. A crash before the next flush loses the commit, not the file content.
idempotency_keyNoOptional at-most-once token. If set, a retry with the same key is a no-op (safe for transparent retries after a daemon restart cuts an in-flight write — ADR-013). Empty (default) disables idempotency.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Discloses commit behavior with durability contract (files persisted even if commit deferred) and idempotency mechanism. Annotations indicate non-read-only and non-destructive, and description adds context without contradiction.

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?

Two short paragraphs with bullet-style mode list. Front-loaded purpose, no fluff, every sentence contributes useful information.

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?

Covers all modes, parameter dependencies, commit behavior, idempotency, and references output schema existence. Adequate for a complex 8-parameter tool.

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 100%, so baseline is 3. Description adds value by explaining how path, section, and operation interact to determine mode, going beyond schema descriptions.

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?

Description clearly states 'write to the vault' with three specific modes (append, replace, create), distinguishing it from sibling tools like vault_delete and vault_commit. The verb and resource are precise, and modes are enumerated.

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 describes when to use each mode (e.g., 'Requires section' for append/replace, 'Requires path' for create) and notes automatic inference. Does not explicitly state when not to use this tool, but mode-specific constraints provide sufficient guidance.

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/mlorentedev/hive'

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