Skip to main content
Glama
ailenshen

Apple Notes MCP Server

create_note

Create Apple Notes from Markdown content, using the first line as the title and optionally specifying a target folder.

Instructions

Create a new note in Apple Notes from Markdown content. The first line becomes the title. Optionally specify a target folder (defaults to 'Notes').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
markdownYesMarkdown content for the note. First line (with or without #) becomes the title.
folderNoTarget folder name (e.g. 'Projects'). Defaults to 'Notes'.

Implementation Reference

  • The MCP tool handler for 'create_note', which calls the underlying 'createNote' function and formats the response.
    async ({ markdown, folder }) => {
      try {
        const title = await createNote(markdown, folder);
        return {
          content: [{ type: "text", text: `Note "${title}" created successfully${folder ? ` in folder "${folder}"` : ""}.` }],
        };
      } catch (e: unknown) {
        return {
          content: [{ type: "text", text: `Error: ${(e as Error).message}` }],
          isError: true,
        };
      }
    }
  • The core 'createNote' function implementation that generates and runs an AppleScript to interact with the Notes application.
    export async function createNote(
      markdown: string,
      targetFolder?: string
    ): Promise<string> {
      // 1. Extract title from first line
      const firstLine = markdown.split("\n")[0].replace(/^#\s*/, "").trim();
      const title = firstLine || "Untitled";
    
      // 2. Write temp .md file
      const tmpPath = join(tmpdir(), `note-${randomUUID()}.md`);
      await writeFile(tmpPath, markdown, "utf-8");
    
      try {
        // 3. Remember current frontmost app, open file, auto-confirm Import sheet
        const importScript = `
    -- Remember which app is currently active
    tell application "System Events"
      set frontApp to name of first process whose frontmost is true
    end tell
    
    do shell script "open -g -a Notes " & quoted form of "${tmpPath}"
    delay 0.5
    
    tell application "System Events"
      tell process "Notes"
        repeat 20 times
          repeat with w in every window
            try
              repeat with s in every sheet of w
                if (name of every button of s) contains "Import" then
                  click button "Import" of s
                  return frontApp
                end if
              end repeat
            end try
          end repeat
          delay 0.2
        end repeat
      end tell
    end tell
    
    return "no_sheet"
    `;
        const importResult = await runAppleScript(importScript);
    
        if (importResult === "no_sheet") {
          throw new Error("Failed to confirm Import sheet within timeout");
        }
    
        const frontApp = importResult;
  • src/index.ts:89-109 (registration)
    Registration of the 'create_note' MCP tool with input schema validation using Zod.
    server.tool(
      "create_note",
      "Create a new note in Apple Notes from Markdown content. The first line becomes the title. Optionally specify a target folder (defaults to 'Notes').",
      {
        markdown: z.string().describe("Markdown content for the note. First line (with or without #) becomes the title."),
        folder: z.string().optional().describe("Target folder name (e.g. 'Projects'). Defaults to 'Notes'."),
      },
      async ({ markdown, folder }) => {
        try {
          const title = await createNote(markdown, folder);
          return {
            content: [{ type: "text", text: `Note "${title}" created successfully${folder ? ` in folder "${folder}"` : ""}.` }],
          };
        } catch (e: unknown) {
          return {
            content: [{ type: "text", text: `Error: ${(e as Error).message}` }],
            isError: true,
          };
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that the first line becomes the title and mentions a default folder, adding useful context beyond the basic 'create' action. However, it lacks details on permissions, error conditions, or what happens if the folder doesn't exist, leaving gaps for a mutation tool.

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 two sentences with zero waste—front-loaded with the core purpose and followed by key behavioral details. Every word earns its place, making it highly efficient and easy to parse.

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

Completeness3/5

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

For a mutation tool with no annotations and no output schema, the description is adequate but incomplete. It covers the basic operation and parameters but lacks information on return values, error handling, or dependencies (e.g., folder existence), which are important for full contextual understanding.

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 already documents both parameters thoroughly. The description adds minimal value by reiterating that the first line becomes the title for 'markdown' and mentioning the default for 'folder', but does not provide additional syntax or format details beyond the schema.

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

Purpose5/5

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

The description clearly states the action ('Create a new note'), resource ('in Apple Notes'), and source format ('from Markdown content'), distinguishing it from siblings like update_note or delete_note. It specifies that the first line becomes the title, which is a specific behavioral detail not implied by the tool name alone.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool (to create notes from Markdown) and mentions the default folder behavior. However, it does not explicitly state when not to use it or name alternatives among siblings (e.g., update_note for existing notes), which prevents a perfect score.

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

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

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