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
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | markdown body (pair with `frontmatter`) | |
| path | Yes | vault-relative path, e.g. decisions/foo-2026-07-09.md | |
| content | No | full raw markdown incl. frontmatter — alternative to body+frontmatter | |
| overwrite | No | confirm you mean to replace an existing note with much shorter content (default false) | |
| frontmatter | No | YAML frontmatter object: title, type, tags, status, related, ... | |
| allow_conflict | No | confirm a near-duplicate of a live note is deliberate — prefer brain_supersede (default false) |