Skip to main content
Glama

notes_get_folders

Retrieve all note folders and their note counts from the macOS Notes app. Use this tool to organize and manage your notes by viewing folder structures and content quantities.

Instructions

Get all note folders with note counts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for 'notes_get_folders' tool: executes AppleScript via osascript to retrieve all folders in the Notes app along with the note count in each folder, formats and returns the result.
    case 'notes_get_folders': try { const command = `osascript -e 'tell application "Notes" set folderInfo to {} repeat with aFolder in folders set folderName to name of aFolder set noteCount to count of notes in aFolder set end of folderInfo to (folderName & ": " & noteCount & " notes") end repeat return folderInfo as string end tell'`; const { stdout, stderr } = await execAsync(command); if (stderr.trim()) { return { content: [ { type: 'text', text: `Error getting note folders: ${stderr.trim()}`, }, ], }; } const output = stdout.trim(); if (!output || output === '') { return { content: [ { type: 'text', text: 'No note folders found', }, ], }; } return { content: [ { type: 'text', text: `Note Folders:\n${output}`, }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Error executing notes folders command: ${error.message}`, }, ], }; }
  • src/index.ts:142-148 (registration)
    Tool registration entry in ListTools response, including name, description, and empty input schema (no parameters required).
    name: 'notes_get_folders', description: 'Get all note folders with note counts', inputSchema: { type: 'object', properties: {}, }, },
  • Input schema for notes_get_folders: empty object (no input parameters).
    inputSchema: { type: 'object', properties: {}, },

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/samicokar/mcp-mac'

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