apple-notes-mcp 2.8.25 → 2.8.27

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.
Files changed (3) hide show
  1. package/README.md +66 -8
  2. package/build/index.js +965 -178
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -201,6 +201,20 @@ 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
+
204
218
  ### Error results
205
219
 
206
220
  A failed call returns `isError: true` with the same human-readable text as
@@ -583,9 +597,9 @@ Retrieves a note using its unique CoreData identifier.
583
597
 
584
598
  | Parameter | Type | Required | Description |
585
599
  |-----------|------|----------|-------------|
586
- | `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)) |
587
601
 
588
- **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.
589
603
 
590
604
  ---
591
605
 
@@ -595,7 +609,7 @@ Reveals a note in Notes.app using its unique CoreData identifier.
595
609
 
596
610
  | Parameter | Type | Required | Description |
597
611
  |-----------|------|----------|-------------|
598
- | `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 |
599
613
  | `separately` | boolean | No | Open in a separate note window when supported by Notes.app |
600
614
 
601
615
  **Returns:** Confirmation that Notes.app accepted the show command.
@@ -879,7 +893,7 @@ Lists all notes, optionally filtered by folder, date, and limit.
879
893
  }
880
894
  ```
881
895
 
882
- **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)).
883
897
 
884
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.
885
899
 
@@ -912,7 +926,48 @@ Lists all folders in an account with full hierarchical paths.
912
926
  {}
913
927
  ```
914
928
 
915
- **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`).
930
+
931
+ ---
932
+
933
+ #### `list-smart-folders`
934
+
935
+ Lists every Smart Folder with the rules that define it, read from the NoteStore
936
+ database. Requires Full Disk Access.
937
+
938
+ | Parameter | Type | Required | Description |
939
+ |-----------|------|----------|-------------|
940
+ | `includeMatchingNotes` | boolean | No | Also list the notes each smart folder currently shows (default `false`) |
941
+ | `limit` | number | No | Maximum matching notes per folder, 1–500 (default 50). `matchingNoteCount` is always the total |
942
+
943
+ **Example:**
944
+ ```json
945
+ {
946
+ "includeMatchingNotes": true,
947
+ "limit": 20
948
+ }
949
+ ```
950
+
951
+ **Returns:** For each smart folder: `name`, `id`, `identifier`, `account`,
952
+ `accountId`, `accountIdentifier`, `parent`, `parentId`, and `parentIdentifier`
953
+ (the parent fields are `null` at the account root). Its rules are decoded as
954
+ `match` (`"all"`, `"any"`, or `"none"`) and `filters`. Each filter has a `type`
955
+ (the stored rule key, such as `folder`, `tag`, `checklist`, or
956
+ `creationDateRelativeRange`), its stored `value`, `excluded` for an Exclude
957
+ rule, and a readable `description`. Folder filters add the folder's `name` and
958
+ `folderId`, and a nested rule group is a filter of type `group` with its own
959
+ `match` and `filters`. Notes stores each query inside an outer
960
+ `{"deleted": false}` wrapper that keeps Recently Deleted out. `query` is the
961
+ stored query with that wrapper removed, `includesRecentlyDeleted` reports the
962
+ wrapper's value, and `rawQuery` is the stored JSON verbatim. A rule this server
963
+ does not recognize is kept as a filter of type `unknown`, and `fullyDecoded` is
964
+ then `false`.
965
+
966
+ With `includeMatchingNotes`, each folder also carries `matchingNoteCount` and
967
+ `matchingNotes` (`title` and `id`). These come from Notes.app itself, which
968
+ evaluates the folder's rules, so they need Automation permission. The server
969
+ does not re-evaluate the rules on its own. A folder whose notes cannot be read
970
+ carries `matchingNotesError` instead.
916
971
 
917
972
  ---
918
973
 
@@ -946,7 +1001,10 @@ Creates a new folder, including a whole nested hierarchy in one call.
946
1001
  #### `get-folder-by-id`
947
1002
 
948
1003
  Reads one exact folder's current name and parent ID. Use these values with
949
- `rename-folder`; this avoids relying on ambiguous folder names or paths.
1004
+ `rename-folder`; this avoids relying on ambiguous folder names or paths. The
1005
+ `id` may also be the folder's Notes UUID or numeric key, and the result adds
1006
+ `identifier`, `parentIdentifier`, and `accountIdentifier` when Full Disk Access
1007
+ is granted.
950
1008
 
951
1009
  ---
952
1010
 
@@ -986,7 +1044,7 @@ Reveals a folder in Notes.app using its unique CoreData identifier.
986
1044
 
987
1045
  | Parameter | Type | Required | Description |
988
1046
  |-----------|------|----------|-------------|
989
- | `id` | string | Yes | The folder's CoreData identifier (from `list-folders`) |
1047
+ | `id` | string | Yes | The folder's CoreData identifier (from `list-folders`), or its Notes UUID or numeric key |
990
1048
  | `separately` | boolean | No | Open in a separate window when supported by Notes.app |
991
1049
 
992
1050
  **Returns:** Confirmation that Notes.app accepted the show command.
@@ -1006,7 +1064,7 @@ Lists all configured Notes accounts.
1006
1064
  {}
1007
1065
  ```
1008
1066
 
1009
- **Returns:** List of accounts with names, IDs, upgraded state, and default folder metadata.
1067
+ **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.
1010
1068
 
1011
1069
  ---
1012
1070