notes_get
Retrieve a specific Apple Notes entry by its title, optionally specifying a folder to search within for targeted access to your macOS notes.
Instructions
[Apple Notes operations] Get a specific note by title
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the note to retrieve | |
| folder | No | Optional folder name to search in |
Implementation Reference
- src/categories/notes.ts:237-292 (handler)Handler function that generates AppleScript code to retrieve a specific note by title from the Apple Notes application, optionally from a specific folder. Returns JSON with title, body, creation date, and modification date.const { title, folder = "" } = args; if (folder) { return ` tell application "Notes" set folderList to folders whose name is "${folder}" if length of folderList > 0 then set targetFolder to item 1 of folderList set matchingNotes to notes of targetFolder whose name is "${title}" if length of matchingNotes > 0 then set n to item 1 of matchingNotes set noteTitle to name of n set noteBody to body of n set noteCreationDate to creation date of n set noteModDate to modification date of n set jsonResult to "{\\"title\\": \\"" set jsonResult to jsonResult & noteTitle & "\\"" set jsonResult to jsonResult & ", \\"body\\": \\"" & noteBody & "\\"" set jsonResult to jsonResult & ", \\"creationDate\\": \\"" & noteCreationDate & "\\"" set jsonResult to jsonResult & ", \\"modificationDate\\": \\"" & noteModDate & "\\"}" return jsonResult else return "Note not found: ${title}" end if else return "Folder not found: ${folder}" end if end tell `; } else { return ` tell application "Notes" set matchingNotes to notes whose name is "${title}" if length of matchingNotes > 0 then set n to item 1 of matchingNotes set noteTitle to name of n set noteBody to body of n set noteCreationDate to creation date of n set noteModDate to modification date of n set jsonResult to "{\\"title\\": \\"" set jsonResult to jsonResult & noteTitle & "\\"" set jsonResult to jsonResult & ", \\"body\\": \\"" & noteBody & "\\"" set jsonResult to jsonResult & ", \\"creationDate\\": \\"" & noteCreationDate & "\\"" set jsonResult to jsonResult & ", \\"modificationDate\\": \\"" & noteModDate & "\\"}" return jsonResult else return "Note not found: ${title}" end if end tell `; } },
- src/categories/notes.ts:293-306 (schema)Input schema defining the parameters for the notes_get tool: required 'title' string, optional 'folder' string.schema: { type: "object", properties: { title: { type: "string", description: "Title of the note to retrieve" }, folder: { type: "string", description: "Optional folder name to search in" } }, required: ["title"] }
- src/index.ts:35-35 (registration)Registers the 'notes' category (containing the 'get' script) with the AppleScriptFramework server.server.addCategory(notesCategory);
- src/framework.ts:224-224 (registration)Constructs the full tool name as 'notes_get' from category 'notes' and script 'get' when listing tools.name: `${category.name}_${script.name}`, // Changed from dot to underscore