export-notes-markdown
Export a single note by exact ID or a folder's notes as one Markdown document, preserving headings, lists, checklists, tables, links, and attachments in body order.
Instructions
Use when: exporting one note (by exact id) or a folder's notes as one Markdown document rendered from the decoded note body: headings, bulleted/dashed/numbered lists with indent, checklists with state, block quotes, monospaced blocks, bold/italic/strikethrough/underline/highlight, links, tables, and attachments in body order. Returns: the Markdown inline (capped by APPLE_NOTES_MCP_EXPORT_MAX_BYTES), or with outputPath a receipt {format, count, bytes, output}; plus attachment counts and skipped notes (for example password-protected ones). Do not use when: you need the legacy HTML-converted Markdown of one note (get-note-markdown) or a restorable backup (export-notes-json). A folder document separates notes with '---' and is a presentation format, not something to import back. Safety: read-only against Notes; requires Full Disk Access. outputPath is create-only (an existing file is refused with [output_exists]); assetsDir copies attachment files without replacing existing ones (collisions get -2, -3 suffixes). Without assetsDir, attachments render as labeled placeholders. Templates: pass template ('standard-markdown' reproduces the default output; 'obsidian' adds YAML front matter and copies attachments beside outputPath) or templateFile (a JSON template; hidden paths and ~/Library outside iCloud Drive and CloudStorage are refused unless the server sets APPLE_NOTES_MCP_ALLOW_PRIVATE_CONTENT_PATHS=1) to control how every block, inline style, attachment, per-note header/footer and separator renders. Templated receipts add template, warnings (e.g. missing_asset) and assetFiles; an invalid template is refused with [invalid-template] and every problem's JSON path.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "export-notes-markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Exact note ID returned by search-notes, list-notes, or create-note: x-coredata id, Notes UUID, or numeric key | |
| wrap | No | Hard-wrap prose at this many columns (0 or omitted: no wrapping) | |
| limit | No | Maximum notes read from the folder (default 100, max 1000) | |
| folder | No | Folder path to export instead of one note (nested paths use '/') | |
| account | No | Account holding the folder (defaults to Notes.app's default account) | |
| template | No | Render through this template: built-in 'standard-markdown' or 'obsidian', or a saved template's name (list-markdown-templates). Exclusive with templateFile | |
| assetsDir | No | Directory that receives copies of attachment files (absolute; under home, a temp dir, or /Volumes; never inside the Notes library) | |
| outputPath | No | File to create for the Markdown (absolute; under home, a temp dir, or /Volumes; never inside the Notes library) | |
| templateFile | No | JSON template file (.json) to render through (exclusive with template; at most 256 KiB; hidden paths and ~/Library outside iCloud Drive and CloudStorage refused unless APPLE_NOTES_MCP_ALLOW_PRIVATE_CONTENT_PATHS=1) (absolute; under home, a temp dir, or /Volumes; never inside the Notes library) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | No | ||
| count | No | ||
| stats | No | ||
| assets | No | ||
| format | No | ||
| output | No | ||
| skipped | No | ||
| markdown | No | ||
| template | No | ||
| warnings | No | ||
| truncated | No | ||
| assetFiles | No | ||
| warningsOmitted | No |