notes_list
List all notes or filter by a specific folder in Apple Notes using AppleScript integration. Simplify organization and retrieval of notes directly from macOS.
Instructions
[Apple Notes operations] List all notes or notes in a specific folder
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Optional folder name to list notes from |
Implementation Reference
- src/categories/notes.ts:198-222 (handler)Handler function that generates the AppleScript for listing notes, optionally filtered by folder.script: (args) => { const { 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 noteNames to name of notes of targetFolder return noteNames as string else return "Folder not found: ${folder}" end if end tell `; } else { return ` tell application "Notes" set noteNames to name of notes return noteNames as string end tell `; } },
- src/categories/notes.ts:224-231 (schema)Input schema defining the optional 'folder' parameter for the notes_list tool.type: "object", properties: { folder: { type: "string", description: "Optional folder name to list notes from" } } }
- src/framework.ts:221-232 (registration)Registers the 'notes_list' tool in the MCP listTools handler by constructing names as category_script.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: this.categories.flatMap((category) => category.scripts.map((script) => ({ name: `${category.name}_${script.name}`, // Changed from dot to underscore description: `[${category.description}] ${script.description}`, inputSchema: script.schema || { type: "object", properties: {}, }, })), ), }));
- src/index.ts:35-35 (registration)Registers the notes category containing the list script, enabling the notes_list tool.server.addCategory(notesCategory);
- src/framework.ts:244-247 (registration)Parses tool names like 'notes_list' into category 'notes' and script 'list' during tool execution.const [categoryName, ...scriptNameParts] = toolName.split("_"); const scriptName = scriptNameParts.join("_"); // Rejoin in case script name has underscores