Skip to main content
Glama

brain_write

Create or overwrite a markdown note with validated YAML frontmatter. Updates existing content while preventing invalid frontmatter or duplicate dated notes.

Instructions

Create or overwrite a note. PREFER body (markdown, no frontmatter) + frontmatter (an object): the YAML is serialised for you and always parses. Hand-writing frontmatter into content risks invalid YAML — a note whose frontmatter fails to parse loses its status, tags and title on every read, so a note claiming status: locked would rank as an ordinary one. Such a write is REJECTED. Follow SCHEMA.md: kebab-case path, dated names for daily/decisions, frontmatter with title/type/tags/status. Path vault-relative (e.g. decisions/foo-2026-07-09.md).

WHEN A FACT CHANGED, DON'T CREATE A DATED SIBLING. Writing acme-pricing-2026.md next to a live acme-pricing.md leaves two live notes disagreeing about one number, and the older one usually matches the query better — this is exactly how a retired price gets quoted. Such a write is REJECTED; use brain_supersede instead, which retires the old note and adds the new one in a single commit. allow_conflict: true overrides it when both notes genuinely belong.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNomarkdown body (pair with `frontmatter`)
pathYesvault-relative path, e.g. decisions/foo-2026-07-09.md
contentNofull raw markdown incl. frontmatter — alternative to body+frontmatter
overwriteNoconfirm you mean to replace an existing note with much shorter content (default false)
frontmatterNoYAML frontmatter object: title, type, tags, status, related, ...
allow_conflictNoconfirm a near-duplicate of a live note is deliberate — prefer brain_supersede (default false)
Behavior4/5

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

No annotations provided, so description fully bears the burden. It discloses that writes with invalid frontmatter are rejected, and that writing a dated sibling for fact changes is rejected. It explains the reasoning behind rejections. Missing auth or rate limit info, but still strong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose and then provides detailed usage guidance. It is structured clearly with paragraphs for different aspects. Could be slightly shorter, but every sentence adds 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?

Given no output schema, description fully covers input semantics, constraints, rejection conditions, and sibling tool differentiation. No gaps remain for an AI agent to invoke this tool correctly.

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%, baseline 3. The description adds significant meaning beyond schema: explains tradeoffs between body+frontmatter vs content, warns about YAML parsing risks, and clarifies when overwrite and allow_conflict flags are needed.

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 overwrite a note' with specific verb and resource. It distinguishes from sibling tools like brain_supersede and brain_append by explaining when each is appropriate.

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?

The description explicitly tells when to prefer body+frontmatter over raw content, when to use brain_supersede instead of writing a dated sibling, and how to use allow_conflict. It also references SCHEMA.md for naming conventions.

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/rwnalds/engram'

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