query-notes
Find Apple Notes with boolean expressions over text and metadata, such as folder, tag, checklist state, flags, and dates, matching title or body in one read-only call.
Instructions
Use when: finding notes with a boolean expression over text and metadata — e.g. folder:Work has:checklist -checklist:done, (title:invoice OR tag:finance) modified:>=2026-07-01, pinned words:>250. Reads the Notes database directly, so it is fast and can match title OR body in one call.
Syntax: bare words and "quoted phrases" match title or body (case-insensitive substring); fields title:, body:, text:, folder:, account:, tag: (values may be quoted, e.g. folder:"Work Projects"); facets has:link|attachment|checklist|drawing|image|video|audio|pdf|table|scan|url|map|tag (has:url is a link preview card, has:map a map); checklist:open|done; flags pinned, locked, shared, quicknote (or is:pinned); quote a flag word such as "quicknote" to search it as text; words:>250 and created:/modified: with =, >, >=, <, <= and YYYY-MM-DD local dates. AND is implicit; OR, NOT, leading -, and parentheses are supported; operators are case-insensitive and a quoted "and" searches the literal word.
Returns: matching notes (most recently modified first) with id, title, folder, account, modified date, snippet, and matchedIn (where the positive text terms occur: title, body, or both; absent when the body is unreadable or the query has no text term), plus scan/match counts; includeWordCount adds wordCount. Ids work with get-note-content and every other id-based tool.
Do not use when: Full Disk Access is unavailable (use search-notes). Scans the most recent scanLimit notes (default 500); raise it for older notes.
Safety: read-only; never writes the database. Excludes Recently Deleted and folderless notes unless includeDeleted is true. Locked notes match on title and metadata only; body predicates (including negated ones such as -body:x) never match them.
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": {
"query": "<query>"
},
"name": "query-notes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum notes to return (default 50, max 500). The response reports how many matched in total. | |
| query | Yes | Boolean query expression, e.g. `folder:"Work Projects" has:checklist -checklist:done` | |
| scanLimit | No | How many of the most recently modified notes to examine (default 500, max 10000). The response says when older notes were left unscanned. | |
| includeDeleted | No | Also scan notes in Recently Deleted, notes pending deletion, and folderless notes (default false) | |
| includeWordCount | No | Add wordCount to each returned note (the count words: filters on; null when locked or unreadable). Free when the query reads bodies; a metadata-only query reads just the returned notes' bodies in one extra query (default false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| limit | No | ||
| notes | No | ||
| matched | No | ||
| scanned | No | ||
| eligible | No | ||
| scanLimit | No | ||
| truncated | No | ||
| unreadable | No | ||
| scanTruncated | No |