export-attachments
Copies all file attachments from a single Apple Notes note into a specified disk directory, or saves only its lead visual.
Instructions
Use when: copying every file attachment of one note (or only its lead visual) into a directory on disk. Returns: per attachment its id, kind, exportedTo, and exportedKind: "asset" for the real file, "fallback" for Notes' own full rendering of it (a drawing's PNG or a scan's PDF, named with that format's extension), "preview" when the asset never downloaded and only Notes' rendered thumbnail was available, or null when nothing was on disk; inBody: false marks an attachment no longer shown in the note body. Do not use when: exporting one attachment to an exact path (save-attachment) or reading bytes inline (fetch-attachment). Safety: writes files; exportDir must be absolute and under the home directory, a temp dir, or /Volumes, and not inside the Notes data folder. Existing files are never replaced: name collisions get -2, -3, ... suffixes. Reads NoteStore and the Notes data folder read-only; requires Full Disk Access. Notes.app is not opened.
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": {
"noteId": "<noteId>",
"exportDir": "<exportDir>"
},
"name": "export-attachments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | Exact note ID returned by search-notes, list-notes, or create-note: x-coredata id, Notes UUID, or numeric key | |
| exportDir | Yes | Absolute destination directory (created if missing; home, temp, or /Volumes) | |
| firstImageOnly | No | Export only the note's lead visual (see list-attachments firstImage) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| failed | No | ||
| results | No | ||
| skipped | No | ||
| exported | No | ||
| previews | No | ||
| exportDir | No | ||
| fallbacks | No | ||
| firstImage | No |