Skip to main content
Glama

notes

Search, retrieve, and create notes in the Apple Notes app. Use this tool to organize notes, find specific content, and manage folders through the Apple MCP Server.

Instructions

Search, retrieve and create notes in Apple Notes app

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoContent of the note to create (required for create operation)
folderNameNoName of the folder to create the note in (optional for create operation, defaults to 'Claude')
operationYesOperation to perform: 'search', 'list', or 'create'
searchTextNoText to search for in notes (required for search operation)
titleNoTitle of the note to create (required for create operation)

Implementation Reference

  • Main execution handler for the 'notes' tool. Dispatches to search, list, or create operations using helper functions from utils/notes.ts.
    case "notes": {
    	if (!isNotesArgs(args)) {
    		throw new Error("Invalid arguments for notes tool");
    	}
    
    	try {
    		const notesModule = await loadModule("notes");
    		const { operation } = args;
    
    		switch (operation) {
    			case "search": {
    				if (!args.searchText) {
    					throw new Error(
    						"Search text is required for search operation",
    					);
    				}
    
    				const foundNotes = await notesModule.findNote(args.searchText);
    				return {
    					content: [
    						{
    							type: "text",
    							text: foundNotes.length
    								? foundNotes
    										.map((note) => `${note.name}:\n${note.content}`)
    										.join("\n\n")
    								: `No notes found for "${args.searchText}"`,
    						},
    					],
    					isError: false,
    				};
    			}
    
    			case "list": {
    				const allNotes = await notesModule.getAllNotes();
    				return {
    					content: [
    						{
    							type: "text",
    							text: allNotes.length
    								? allNotes
    										.map((note) => `${note.name}:\n${note.content}`)
    										.join("\n\n")
    								: "No notes exist.",
    						},
    					],
    					isError: false,
    				};
    			}
    
    			case "create": {
    				if (!args.title || !args.body) {
    					throw new Error(
    						"Title and body are required for create operation",
    					);
    				}
    
    				const result = await notesModule.createNote(
    					args.title,
    					args.body,
    					args.folderName,
    				);
    
    				return {
    					content: [
    						{
    							type: "text",
    							text: result.success
    								? `Created note "${args.title}" in folder "${result.folderName}"${result.usedDefaultFolder ? " (created new folder)" : ""}.`
    								: `Failed to create note: ${result.message}`,
    						},
    					],
    					isError: !result.success,
    				};
    			}
    
    			default:
    				throw new Error(`Unknown operation: ${operation}`);
    		}
    	} catch (error) {
    		const errorMessage = error instanceof Error ? error.message : String(error);
    		return {
    			content: [
    				{
    					type: "text",
    					text: errorMessage.includes("access") ? errorMessage : `Error accessing notes: ${errorMessage}`,
    				},
    			],
    			isError: true,
    		};
    	}
    }
  • Input schema and metadata definition for the 'notes' tool.
    const NOTES_TOOL: Tool = {
      name: "notes", 
      description: "Search, retrieve and create notes in Apple Notes app",
      inputSchema: {
        type: "object",
        properties: {
          operation: {
            type: "string",
            description: "Operation to perform: 'search', 'list', or 'create'",
            enum: ["search", "list", "create"]
          },
          searchText: {
            type: "string",
            description: "Text to search for in notes (required for search operation)"
          },
          title: {
            type: "string",
            description: "Title of the note to create (required for create operation)"
          },
          body: {
            type: "string",
            description: "Content of the note to create (required for create operation)"
          },
          folderName: {
            type: "string",
            description: "Name of the folder to create the note in (optional for create operation, defaults to 'Claude')"
          }
        },
        required: ["operation"]
      }
    };
  • tools.ts:294-296 (registration)
    The 'notes' tool (NOTES_TOOL) is registered in the exported tools array used by the MCP server for tool listing.
    const tools = [CONTACTS_TOOL, NOTES_TOOL, MESSAGES_TOOL, MAIL_TOOL, REMINDERS_TOOL, CALENDAR_TOOL, MAPS_TOOL];
    
    export default tools;
  • Helper functions exported from utils/notes.ts, including getAllNotes, findNote, and createNote, which implement the core logic for interacting with Apple Notes app via AppleScript.
    export default {
    	getAllNotes,
    	findNote,
    	createNote,
    	getNotesFromFolder,
    	getRecentNotesFromFolder,
    	getNotesByDateRange,
    	requestNotesAccess,
    };
  • Runtime type validation function for notes tool arguments, complementing the JSON schema.
    function isNotesArgs(args: unknown): args is {
    	operation: "search" | "list" | "create";
    	searchText?: string;
    	title?: string;
    	body?: string;
    	folderName?: string;
    } {
    	if (typeof args !== "object" || args === null) {
    		return false;
    	}
    
    	const { operation } = args as { operation?: unknown };
    	if (typeof operation !== "string") {
    		return false;
    	}
    
    	if (!["search", "list", "create"].includes(operation)) {
    		return false;
    	}
    
    	// Validate fields based on operation
    	if (operation === "search") {
    		const { searchText } = args as { searchText?: unknown };
    		if (typeof searchText !== "string" || searchText === "") {
    			return false;
    		}
    	}
    
    	if (operation === "create") {
    		const { title, body } = args as { title?: unknown; body?: unknown };
    		if (typeof title !== "string" || title === "" || typeof body !== "string") {
    			return false;
    		}
    
    		// Check folderName if provided
    		const { folderName } = args as { folderName?: unknown };
    		if (
    			folderName !== undefined &&
    			(typeof folderName !== "string" || folderName === "")
    		) {
    			return false;
    		}
    	}
    
    	return true;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral disclosure. It mentions three operations but doesn't describe what 'retrieve' means (likely mapping to 'list'), whether operations require specific permissions, how search results are returned, or any rate limits. For a multi-operation tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that efficiently communicates the core functionality. Every word earns its place with no wasted text, though this conciseness comes at the cost of completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a multi-operation tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain return values, error conditions, or behavioral nuances. The tool handles both read (search/list) and write (create) operations, but the description doesn't address these different security implications or usage patterns.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no parameter-specific information beyond what's in the schema. The baseline of 3 is appropriate when the schema does all the heavy lifting for parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('search, retrieve and create') and resource ('notes in Apple Notes app'). It distinguishes from sibling tools like calendar or contacts by specifying the Notes app domain. However, it doesn't differentiate between the three operations within the tool itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus the sibling tools (calendar, contacts, etc.) or when to choose between the three operations (search, list, create). The description only lists operations without context about appropriate use cases or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/supermemoryai/apple-mcp'

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