apple-notes-mcp 2.8.22 → 2.8.23
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 +68 -0
- package/build/index.js +950 -92
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,6 +160,7 @@ On first use, macOS will ask for permission to automate Notes.app. Click "OK" to
|
|
|
160
160
|
|---------|-------------|
|
|
161
161
|
| **Create Notes** | Create notes with titles, content, and optional folder/account targeting |
|
|
162
162
|
| **Search Notes** | Find notes by title or search within note content |
|
|
163
|
+
| **Query Language** | `query-notes` combines text, folder, account, tag, attachment, checklist, flag, word-count, and date conditions with AND/OR/NOT, read from the Notes database (requires Full Disk Access) |
|
|
163
164
|
| **Read Notes** | Retrieve note content and metadata |
|
|
164
165
|
| **Update Notes** | Modify existing notes (title and/or content) |
|
|
165
166
|
| **Delete Notes** | Remove notes (moves to Recently Deleted) |
|
|
@@ -347,6 +348,73 @@ Searches for notes by title or content.
|
|
|
347
348
|
|
|
348
349
|
---
|
|
349
350
|
|
|
351
|
+
#### `query-notes`
|
|
352
|
+
|
|
353
|
+
Finds notes with a boolean query expression evaluated against the NoteStore
|
|
354
|
+
database, read-only. Because it does not go through AppleScript, a query over
|
|
355
|
+
several hundred notes typically returns in well under a second, and one call
|
|
356
|
+
can match titles and bodies together.
|
|
357
|
+
|
|
358
|
+
**Requires:** Full Disk Access for the MCP host process (see [Full Disk Access Setup](#full-disk-access)). Without it, use `search-notes`.
|
|
359
|
+
|
|
360
|
+
| Parameter | Type | Required | Description |
|
|
361
|
+
|-----------|------|----------|-------------|
|
|
362
|
+
| `query` | string | Yes | Query expression (syntax below), at most 2000 characters |
|
|
363
|
+
| `limit` | number | No | Maximum notes to return. Defaults to 50, maximum 500. The response reports the total match count. |
|
|
364
|
+
| `scanLimit` | number | No | How many of the most recently modified notes to examine. Defaults to 500, maximum 5000. The response says when older notes were left unscanned. |
|
|
365
|
+
| `includeDeleted` | boolean | No | Also scan notes in Recently Deleted, notes pending deletion, and folderless notes. Defaults to `false`. |
|
|
366
|
+
|
|
367
|
+
**Syntax:**
|
|
368
|
+
|
|
369
|
+
| Form | Matches |
|
|
370
|
+
|------|---------|
|
|
371
|
+
| `budget`, `"quarterly budget"` | Title or body contains the word or phrase (case-insensitive substring) |
|
|
372
|
+
| `title:x`, `body:x`, `text:x` | Title only, body only (text after the first line), or either |
|
|
373
|
+
| `folder:Work`, `folder:"Work/Clients"` | The note's own folder, by name or full path, case-insensitive (notes in subfolders are not included); a literal `/` in a name can be written `\/` as in `list-folders` |
|
|
374
|
+
| `account:iCloud` | Account name, case-insensitive |
|
|
375
|
+
| `tag:finance` | Native Notes tag (with or without `#`); textual hashtags are ordinary words |
|
|
376
|
+
| `has:link`, `has:attachment`, `has:checklist`, `has:drawing`, `has:image`, `has:video`, `has:audio`, `has:pdf`, `has:table`, `has:scan`, `has:tag` | The note body contains that kind of object |
|
|
377
|
+
| `checklist:open`, `checklist:done` | At least one unchecked item; or items present and all checked |
|
|
378
|
+
| `pinned`, `locked`, `shared` (or `is:pinned` …) | Note flags; `shared` includes notes in a shared folder |
|
|
379
|
+
| `words:>250` | Word count, with `=`, `>`, `>=`, `<`, `<=` |
|
|
380
|
+
| `created:>=2026-07-01`, `modified:<2026-09-01` | Dates as `YYYY-MM-DD` in local time, with the same operators; `=` means that whole day |
|
|
381
|
+
| `a b`, `a AND b`, `a OR b`, `NOT a`, `-a`, `( … )` | AND is implicit and binds tighter than OR |
|
|
382
|
+
|
|
383
|
+
Operators are case-insensitive. Quote an operator or flag word to search it
|
|
384
|
+
literally, for example `"and"` or `"pinned"`. Queries are capped at 256 tokens
|
|
385
|
+
and 64 levels of nesting. An unknown field such as `titel:x` is an error rather
|
|
386
|
+
than a silent text search; quote it to search the literal text.
|
|
387
|
+
|
|
388
|
+
Password-protected notes match on title and metadata only. Their bodies are
|
|
389
|
+
encrypted, so body predicates never match them, and `-body:x` therefore does.
|
|
390
|
+
Their snippets are always empty.
|
|
391
|
+
|
|
392
|
+
**Example - Open to-dos in a folder:**
|
|
393
|
+
```json
|
|
394
|
+
{
|
|
395
|
+
"query": "folder:\"Work Projects\" has:checklist -checklist:done"
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**Example - Invoices or finance-tagged notes since July, scanning more history:**
|
|
400
|
+
```json
|
|
401
|
+
{
|
|
402
|
+
"query": "(title:invoice OR tag:finance) modified:>=2026-07-01",
|
|
403
|
+
"scanLimit": 2000,
|
|
404
|
+
"limit": 20
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Returns:** Matching notes, most recently modified first, each with `id`,
|
|
409
|
+
`title`, `folder`, `account`, `modified`, `created`, and a `snippet` centred on
|
|
410
|
+
the first matched phrase. The ids are the same `x-coredata://…/ICNote/p…` form
|
|
411
|
+
every other tool accepts. `structuredContent` also reports `matched` (total
|
|
412
|
+
matches), `scanned`, `eligible`, `scanTruncated`, `truncated`, and `unreadable`
|
|
413
|
+
(bodies that could not be decoded). A malformed query returns an error naming
|
|
414
|
+
the problem and its position.
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
350
418
|
#### `get-note-content`
|
|
351
419
|
|
|
352
420
|
Retrieves the full content of a specific note.
|