export-notes-html
Exports one note or a folder's notes as a standalone HTML file, embedding assets or writing sidecar files while preserving tables, images, drawings, and attachments in body order.
Instructions
Use when: exporting one note (by exact id) or a folder's notes as one standalone HTML file rendered from the decoded note body, with semantic tables and images, drawings, scans, audio, files and link cards in body order. Returns: a receipt {format, count, bytes, output} plus embedded or sidecar asset counts, attachment counts and skipped notes. The HTML itself is never returned inline. Do not use when: you want Markdown (export-notes-markdown) or a restorable backup (export-notes-json). A folder document is a presentation format, not something to import back. Safety: read-only against Notes; requires Full Disk Access. outputPath is required and create-only ([output_exists] if it exists). Assets are embedded as data URLs (each up to 10 MiB) unless embedAssets is false, which copies them to a sidecar directory (assetsDir, default .assets) with relative URLs and never replaces existing files. No file: URLs or Notes library paths are written; missing assets show a visible unavailable marker. Drawings: by default every drawing keeps Notes' PNG. With vectorDrawings true, classic PencilKit drawings are rendered as SVG through the public native helper (setup --public-helper); Paper drawings keep the PNG. A drawing that cannot be decoded falls back to the PNG and is counted in vectorDrawings.fallbackReasons; it never fails the export.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"outputPath": "<outputPath>"
},
"name": "export-notes-html"
}
}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 | |
| 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) | |
| assetsDir | No | Sidecar directory when embedAssets is false (default <stem>.assets) (absolute; under home, a temp dir, or /Volumes; never inside the Notes library) | |
| outputPath | Yes | HTML file to create (absolute; under home, a temp dir, or /Volumes; never inside the Notes library) | |
| embedAssets | No | Embed assets as data URLs (default true). False writes a sidecar directory | |
| vectorDrawings | No | Render classic PencilKit drawings as SVG via the public native helper (default false). When false or omitted, Notes' PNG rendering is kept and the helper never runs |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | No | ||
| count | No | ||
| stats | No | ||
| assets | No | ||
| format | No | ||
| output | No | ||
| skipped | No | ||
| embedded | No | ||
| truncated | No | ||
| vectorDrawings | No |