Skip to main content
Glama

notes_get

Retrieve a specific note from Apple Notes by its title using AppleScript through the MCP server. Optional folder search to locate the note efficiently.

Instructions

[Apple Notes operations] Get a specific note by title

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoOptional folder name to search in
titleYesTitle of the note to retrieve

Implementation Reference

  • Handler function for notes_get tool: generates AppleScript to retrieve a specific note by title (optionally from a folder) and returns JSON with title, body, creation date, and modification date.
    script: (args) => { 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 `; } },
  • Input schema for notes_get tool defining required 'title' and optional 'folder' parameters.
    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"] }
  • Tool registration for discovery: constructs tool names as '{category}_{script}' (e.g., 'notes_get') and exposes schema.
    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: {}, }, })), ), }));
  • Tool call dispatching: parses 'notes_get' by splitting on '_', locates notes category and 'get' script, executes the handler.
    const [categoryName, ...scriptNameParts] = toolName.split("_"); const scriptName = scriptNameParts.join("_"); // Rejoin in case script name has underscores
  • src/index.ts:34-35 (registration)
    Registers the notes category (containing notes_get implementation) with the MCP server.
    server.addCategory(messagesCategory); server.addCategory(notesCategory);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joshrutkowski/applescript-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server