Write Note
writeCreate or overwrite markdown documents and attachments in a vault. Supports frontmatter, full body content, and base64 binary data, with search index updates on write.
Instructions
Create or overwrite a document or attachment.
For .md documents: uses 'content' (markdown body) and optional 'frontmatter'. WARNING: replaces the entire file — use 'edit' for targeted changes. The search index is updated immediately; do not call 'reindex' afterward.
For attachments (pdf, png, etc.): uses 'content_base64' (base64- encoded binary). 'content' and 'frontmatter' are ignored. Parent directories are created automatically for both.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative path (e.g. "Journal/note.md" or "assets/photo.png"). Extension determines handling. | |
| content | No | Full markdown body for .md files (excluding frontmatter). Ignored for attachments. | |
| if_match | No | Optional etag obtained from a previous 'read' call. When provided, the write only proceeds if the file has not been modified since that read (optimistic concurrency). Omit to write unconditionally. | |
| frontmatter | No | Optional YAML frontmatter dict for .md files, e.g. {"title": "My Note", "tags": ["draft"]}. Ignored for attachments. | |
| content_base64 | No | Base64-encoded binary content for attachment files. Required when path is not ``.md``. **Context cost:** base64 encoding inflates by ~33%; even a 1 MB attachment becomes ~1.3 MB of tokens. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||