apple-notes-mcp 2.9.13 → 2.9.15
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 +33 -1
- package/build/index.js +2058 -495
- package/docs/markdown-templates.md +239 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -425,6 +425,7 @@ Searches for notes by title or content.
|
|
|
425
425
|
| `folder` | string | No | Limit search to a specific folder (supports nested paths like `"Work/Clients"`) |
|
|
426
426
|
| `modifiedSince` | string | No | ISO 8601 date string to filter notes modified on or after this date (e.g., `"2025-01-01"`) |
|
|
427
427
|
| `limit` | number | No | Maximum number of results to return. **Defaults to 50** — a broad query reads several properties per match via AppleScript (~200ms/note), so an unbounded search over hundreds of matches can exceed Notes' 30s timeout and return an error instead of results. Pass a higher value to see more; the applied limit (and whether it truncated the results) is disclosed in the response. |
|
|
428
|
+
| `includeWordCount` | boolean | No | Add `wordCount` to each result (`null` when the note is locked or its body unreadable). A database content search already has the text. Otherwise the bodies are read in one batched read-only database query, never one AppleScript call per note; that needs Full Disk Access and also adds `matchedIn`. Without it, the response carries `wordCountUnavailable` and the results are unchanged. |
|
|
428
429
|
|
|
429
430
|
**Example - Search titles:**
|
|
430
431
|
```json
|
|
@@ -453,6 +454,17 @@ Searches for notes by title or content.
|
|
|
453
454
|
|
|
454
455
|
**Returns:** List of matching notes with titles, folder names, and IDs. Use the returned ID for subsequent operations like `get-note-content`, `update-note`, etc. A content search also returns `source` (`"database"` or `"applescript"`), and `scanTruncated` when the database path left older notes unsearched.
|
|
455
456
|
|
|
457
|
+
When the note text came from the database (a database content search, or any search with `includeWordCount`), each result also carries `matchedIn`: `["title"]`, `["body"]`, or `["title", "body"]`, saying where the query text occurs. The body is the text after the first line. `matchedIn` is absent for locked notes and for AppleScript searches without `includeWordCount`. The text output appends the same details to each line, for example `· matched in title, body · 245 words`.
|
|
458
|
+
|
|
459
|
+
**Example - Content search with word counts:**
|
|
460
|
+
```json
|
|
461
|
+
{
|
|
462
|
+
"query": "budget",
|
|
463
|
+
"searchContent": true,
|
|
464
|
+
"includeWordCount": true
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
|
|
456
468
|
---
|
|
457
469
|
|
|
458
470
|
#### `query-notes`
|
|
@@ -470,6 +482,7 @@ can match titles and bodies together.
|
|
|
470
482
|
| `limit` | number | No | Maximum notes to return. Defaults to 50, maximum 500. The response reports the total match count. |
|
|
471
483
|
| `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. |
|
|
472
484
|
| `includeDeleted` | boolean | No | Also scan notes in Recently Deleted, notes pending deletion, and folderless notes. Defaults to `false`. |
|
|
485
|
+
| `includeWordCount` | boolean | No | Add `wordCount` to each returned note, the same count `words:` filters on (`null` when locked or unreadable). Free when the query already reads bodies; a metadata-only query (for example `pinned`) reads just the returned notes' bodies in one extra read-only query. Defaults to `false`. |
|
|
473
486
|
|
|
474
487
|
**Syntax:**
|
|
475
488
|
|
|
@@ -514,7 +527,11 @@ Their snippets are always empty.
|
|
|
514
527
|
|
|
515
528
|
**Returns:** Matching notes, most recently modified first, each with `id`,
|
|
516
529
|
`title`, `folder`, `account`, `modified`, `created`, and a `snippet` centred on
|
|
517
|
-
the first matched phrase.
|
|
530
|
+
the first matched phrase. Each note also has `matchedIn` when the query has a
|
|
531
|
+
positive text term: `["title"]`, `["body"]`, or both, saying where those terms
|
|
532
|
+
occur (a `title:` term is only looked for in the title, a `body:` term only in
|
|
533
|
+
the body). It is absent for locked or undecodable notes, and an empty list
|
|
534
|
+
means the note matched through a non-text branch such as `pinned OR x`. The ids are the same `x-coredata://…/ICNote/p…` form
|
|
518
535
|
every other tool accepts. `structuredContent` also reports `matched` (total
|
|
519
536
|
matches), `scanned`, `eligible`, `scanTruncated`, `truncated`, and `unreadable`
|
|
520
537
|
(bodies that could not be decoded). A malformed query returns an error naming
|
|
@@ -1693,6 +1710,8 @@ single note.
|
|
|
1693
1710
|
| `outputPath` | string | No | Absolute file to create. Create-only: an existing file (or symlink) is refused with `[output_exists]` |
|
|
1694
1711
|
| `assetsDir` | string | No | Absolute directory for attachment copies. Existing files are never replaced; a taken name gets `-2`, `-3`, ... |
|
|
1695
1712
|
| `wrap` | number | No | Hard-wrap prose at this many columns. Code, tables and headings are never wrapped |
|
|
1713
|
+
| `template` | string | No | Render through a template: `standard-markdown` or `obsidian`. Exclusive with `templateFile` |
|
|
1714
|
+
| `templateFile` | string | No | Render through the JSON template in this `.json` file (same path rules; at most 256 KiB) |
|
|
1696
1715
|
|
|
1697
1716
|
Both paths follow the `save-attachment` rules (absolute, under the home
|
|
1698
1717
|
directory, a temp directory, or `/Volumes`, no symlink escapes) and may not
|
|
@@ -1707,6 +1726,19 @@ Both carry `stats` (attachments, placed, placeholders, unavailable, tables,
|
|
|
1707
1726
|
unreadableTables, unreferenced) and `skipped`. Nothing already written is
|
|
1708
1727
|
deleted if a later step fails.
|
|
1709
1728
|
|
|
1729
|
+
**Templates:** `template` or `templateFile` renders through a portable JSON
|
|
1730
|
+
template that sets how every block style, inline format, attachment,
|
|
1731
|
+
per-note header and footer (for YAML front matter with title, dates,
|
|
1732
|
+
folder, tags and id), and the note separator are written. The built-in
|
|
1733
|
+
`standard-markdown` reproduces the default output; `obsidian` adds front
|
|
1734
|
+
matter and copies attachments into `<file>.assets` beside `outputPath`.
|
|
1735
|
+
Templated asset copies get stable content-hashed names and are reused on a
|
|
1736
|
+
repeat export. An invalid template is refused with `[invalid-template]` and
|
|
1737
|
+
one JSON path per problem, before any note is read. A templated receipt adds
|
|
1738
|
+
`template`, `warnings` (such as `missing_asset`) and `assetFiles`. See
|
|
1739
|
+
[docs/markdown-templates.md](docs/markdown-templates.md) for the schema,
|
|
1740
|
+
every rule and placeholder, and examples.
|
|
1741
|
+
|
|
1710
1742
|
---
|
|
1711
1743
|
|
|
1712
1744
|
#### `export-notes-html`
|