Write note
bm_writeCreates or replaces a Basic Memory note as a Markdown file, addressed by file path or title and directory. Guards existing notes against accidental overwrites unless explicitly forced or checksum-matched.
Instructions
Create or replace a Basic Memory note. Give a file path as identifier ('notes/plan.md'), or title plus directory. With a path the file lands exactly there and the title comes from the content's frontmatter, then title, then the file name. An existing note is an error unless overwrite=true; pass expected_checksum (from bm_read) to replace only the revision you read. To change part of a note use bm_edit. Content may hold frontmatter, observations ('- [category] fact #tag') and relations ('- relation_type [[Other Note]]').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Tags, as a list or 'a,b,c'. | |
| title | No | Note title. With `directory`, it also names the file. With `identifier`, it is used when the content has no frontmatter title. | |
| content | Yes | The note's Markdown. Saved as given; it may start with frontmatter. | |
| project | No | Project name, 'workspace/project', or project external id. Omit to use the default project. | |
| metadata | No | Extra frontmatter fields, merged into the note's frontmatter. | |
| directory | No | Folder for a note addressed by title, e.g. 'meetings'; '/' is the root. | |
| note_type | No | Frontmatter `type:`. A `type:` in the content wins. | note |
| overwrite | No | Replace a note that already exists. Default: the write_note_overwrite_default setting (false unless changed). | |
| identifier | No | File path for the note, e.g. 'notes/plan.md'; '.md' is added when missing. '<project>/path' writes into another project. Use instead of title + directory. | |
| output_format | No | text | |
| expected_checksum | No | Replace the note only while it is still this revision (the checksum from bm_read). Implies overwrite=true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |