apple-notes-mcp 2.8.24 → 2.8.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -8
- package/build/index.js +533 -186
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -201,6 +201,49 @@ for the investigation and verification behind each:
|
|
|
201
201
|
|
|
202
202
|
This section documents all available tools. AI agents should use these tool names and parameters exactly as specified.
|
|
203
203
|
|
|
204
|
+
### Identifier forms
|
|
205
|
+
|
|
206
|
+
Every tool that takes a note id (`id`, `noteId`, `ids`, `linkedNoteId`, or the `id` inside a batch entry) accepts any of three forms of the same note:
|
|
207
|
+
|
|
208
|
+
| Form | Example shape | Needs Full Disk Access |
|
|
209
|
+
|------|---------------|------------------------|
|
|
210
|
+
| AppleScript id (canonical) | `x-coredata://<store-uuid>/ICNote/p123` | No |
|
|
211
|
+
| Notes UUID (`identifier`) | `8-4-4-4-12` hex digits, as in `notes://showNote?identifier=` links | Yes |
|
|
212
|
+
| Numeric Core Data key | `123` (the digits after `p`) | Yes |
|
|
213
|
+
|
|
214
|
+
The server turns a UUID or numeric key into the canonical id before the tool runs, reading the Notes database read-only. A numeric key or UUID resolves only to a note, never to a folder or attachment. Without Full Disk Access those two forms fail with an error that says so, while `x-coredata` ids keep working as before. Folder-id inputs (`show-folder`, `get-folder-by-id`, `rename-folder`) accept a folder's UUID or numeric key the same way, resolving only to folders.
|
|
215
|
+
|
|
216
|
+
When Full Disk Access is granted, list and read tools also return stable identifiers next to each `id`: notes carry `identifier`, `folderIdentifier`, and `accountIdentifier`; folders carry `identifier`, `parentIdentifier` (nested folders only), and `accountIdentifier`; accounts carry `identifier`. These fields come from one batched read-only query per call and are omitted when the database cannot be read. Tools that return them: `search-notes`, `list-notes`, `get-selected-notes`, `list-shared-notes`, `get-note-content`, `get-note-by-id`, `get-note-details`, `list-folders`, `get-folder-by-id`, `list-accounts`, and `get-default-location`.
|
|
217
|
+
|
|
218
|
+
### Error results
|
|
219
|
+
|
|
220
|
+
A failed call returns `isError: true` with the same human-readable text as
|
|
221
|
+
before, plus `structuredContent` carrying a stable machine-readable `code`.
|
|
222
|
+
Branch on `code`, not on the prose, which may be reworded.
|
|
223
|
+
|
|
224
|
+
| `code` | Meaning |
|
|
225
|
+
|--------|---------|
|
|
226
|
+
| `not_found` | The note, folder, account, attachment, or checklist does not exist |
|
|
227
|
+
| `ambiguous` | More than one item matched; use an exact id |
|
|
228
|
+
| `permission_denied` | macOS refused Automation access to Notes.app |
|
|
229
|
+
| `full_disk_access_missing` | The Notes database is not readable; grant Full Disk Access |
|
|
230
|
+
| `shortcut_not_installed` | A native-write bridge Shortcut is not installed exactly once |
|
|
231
|
+
| `timeout_indeterminate` | The operation timed out; for a write, the outcome is unknown |
|
|
232
|
+
| `verification_failed` | The write ran, but exact-ID readback did not confirm it |
|
|
233
|
+
| `revision_conflict` | The note changed since it was read |
|
|
234
|
+
| `validation_error` | The request was rejected before anything ran |
|
|
235
|
+
| `unsupported` | Not supported for this note or in this mode, such as a locked note |
|
|
236
|
+
| `notes_unavailable` | Notes.app is not running, busy, or not responding |
|
|
237
|
+
| `operation_failed` | The server could not classify the failure; read the text |
|
|
238
|
+
|
|
239
|
+
Two optional booleans describe a write's outcome when it is known.
|
|
240
|
+
`indeterminate: true` means the outcome is uncertain: read the target by exact
|
|
241
|
+
id before any retry, and never retry blindly. `committed: true` means the write
|
|
242
|
+
took effect even though its verification failed; `committed: false` means
|
|
243
|
+
nothing was written (for example a `revision_conflict`). An absent flag means
|
|
244
|
+
unknown. Errors the MCP SDK raises itself before a tool runs, such as an
|
|
245
|
+
argument that fails the input schema, carry no `structuredContent`.
|
|
246
|
+
|
|
204
247
|
### Note Operations
|
|
205
248
|
|
|
206
249
|
#### `create-note`
|
|
@@ -554,9 +597,9 @@ Retrieves a note using its unique CoreData identifier.
|
|
|
554
597
|
|
|
555
598
|
| Parameter | Type | Required | Description |
|
|
556
599
|
|-----------|------|----------|-------------|
|
|
557
|
-
| `id` | string | Yes | The CoreData URL identifier (e.g., `x-coredata://...`) |
|
|
600
|
+
| `id` | string | Yes | The CoreData URL identifier (e.g., `x-coredata://...`), or the note's Notes UUID or numeric key (see [Identifier forms](#identifier-forms)) |
|
|
558
601
|
|
|
559
|
-
**Returns:** JSON with note metadata, or error if not found.
|
|
602
|
+
**Returns:** JSON with note metadata, plus `identifier`, `folderIdentifier`, and `accountIdentifier` when Full Disk Access is granted, or error if not found.
|
|
560
603
|
|
|
561
604
|
---
|
|
562
605
|
|
|
@@ -566,7 +609,7 @@ Reveals a note in Notes.app using its unique CoreData identifier.
|
|
|
566
609
|
|
|
567
610
|
| Parameter | Type | Required | Description |
|
|
568
611
|
|-----------|------|----------|-------------|
|
|
569
|
-
| `id` | string | Yes | The CoreData URL identifier (e.g., `x-coredata://...`) |
|
|
612
|
+
| `id` | string | Yes | The CoreData URL identifier (e.g., `x-coredata://...`), or the note's Notes UUID or numeric key |
|
|
570
613
|
| `separately` | boolean | No | Open in a separate note window when supported by Notes.app |
|
|
571
614
|
|
|
572
615
|
**Returns:** Confirmation that Notes.app accepted the show command.
|
|
@@ -850,7 +893,7 @@ Lists all notes, optionally filtered by folder, date, and limit.
|
|
|
850
893
|
}
|
|
851
894
|
```
|
|
852
895
|
|
|
853
|
-
**Returns:** List of notes as `{title, id}` pairs — `notes: Array<{title, id}>`, plus `count`. The human-readable line is ` - <title> [id: <id>]`.
|
|
896
|
+
**Returns:** List of notes as `{title, id}` pairs — `notes: Array<{title, id}>`, plus `count`. The human-readable line is ` - <title> [id: <id>]`. With Full Disk Access each entry also carries `identifier`, `folderIdentifier`, and `accountIdentifier` (see [Identifier forms](#identifier-forms)).
|
|
854
897
|
|
|
855
898
|
Use the returned `id` for any follow-up read/update/move/delete rather than re-resolving the title: titles are not unique, and a by-title lookup resolves a duplicated title to the same one note every time, silently skipping the others.
|
|
856
899
|
|
|
@@ -883,7 +926,7 @@ Lists all folders in an account with full hierarchical paths.
|
|
|
883
926
|
{}
|
|
884
927
|
```
|
|
885
928
|
|
|
886
|
-
**Returns:** List of folders with IDs, paths, account names, and shared state. Nested folders are shown as full paths (e.g., `Work/Clients/Omnia`). Duplicate folder names are disambiguated by their full path. Literal slashes in folder names are escaped as `\/` (e.g., `Spain\/Portugal 2023`).
|
|
929
|
+
**Returns:** List of folders with IDs, paths, account names, and shared state, plus `identifier`, `parentIdentifier`, and `accountIdentifier` when Full Disk Access is granted. Nested folders are shown as full paths (e.g., `Work/Clients/Omnia`). Duplicate folder names are disambiguated by their full path. Literal slashes in folder names are escaped as `\/` (e.g., `Spain\/Portugal 2023`).
|
|
887
930
|
|
|
888
931
|
---
|
|
889
932
|
|
|
@@ -917,7 +960,10 @@ Creates a new folder, including a whole nested hierarchy in one call.
|
|
|
917
960
|
#### `get-folder-by-id`
|
|
918
961
|
|
|
919
962
|
Reads one exact folder's current name and parent ID. Use these values with
|
|
920
|
-
`rename-folder`; this avoids relying on ambiguous folder names or paths.
|
|
963
|
+
`rename-folder`; this avoids relying on ambiguous folder names or paths. The
|
|
964
|
+
`id` may also be the folder's Notes UUID or numeric key, and the result adds
|
|
965
|
+
`identifier`, `parentIdentifier`, and `accountIdentifier` when Full Disk Access
|
|
966
|
+
is granted.
|
|
921
967
|
|
|
922
968
|
---
|
|
923
969
|
|
|
@@ -957,7 +1003,7 @@ Reveals a folder in Notes.app using its unique CoreData identifier.
|
|
|
957
1003
|
|
|
958
1004
|
| Parameter | Type | Required | Description |
|
|
959
1005
|
|-----------|------|----------|-------------|
|
|
960
|
-
| `id` | string | Yes | The folder's CoreData identifier (from `list-folders`) |
|
|
1006
|
+
| `id` | string | Yes | The folder's CoreData identifier (from `list-folders`), or its Notes UUID or numeric key |
|
|
961
1007
|
| `separately` | boolean | No | Open in a separate window when supported by Notes.app |
|
|
962
1008
|
|
|
963
1009
|
**Returns:** Confirmation that Notes.app accepted the show command.
|
|
@@ -977,7 +1023,7 @@ Lists all configured Notes accounts.
|
|
|
977
1023
|
{}
|
|
978
1024
|
```
|
|
979
1025
|
|
|
980
|
-
**Returns:** List of accounts with names, IDs, upgraded state, and default folder metadata.
|
|
1026
|
+
**Returns:** List of accounts with names, IDs, upgraded state, and default folder metadata, plus each account's `identifier` (Notes UUID) when Full Disk Access is granted.
|
|
981
1027
|
|
|
982
1028
|
---
|
|
983
1029
|
|