Skip to main content
Glama
ailenshen

Apple Notes MCP Server

list_notes

Retrieve and filter notes from Apple Notes with titles, folders, dates, pinned status, and snippets. Use folder filtering and result limits to organize your notes.

Instructions

List notes from Apple Notes. Returns title, folder, dates, pinned status, snippet. Optionally filter by folder name and limit results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoFilter by folder name
limitNoMax number of notes to return

Implementation Reference

  • src/db.ts:51-74 (handler)
    The implementation of the logic to query and list notes from the Apple Notes database.
    export function listNotes(folder?: string, limit?: number): NoteRow[] {
      const db = getDb();
      let sql = LIST_QUERY;
      const params: unknown[] = [];
    
      if (folder) {
        sql = sql.replace(
          "ORDER BY",
          "AND f.ZTITLE2 = ? ORDER BY"
        );
        params.push(folder);
      }
    
      if (limit) {
        sql += ` LIMIT ?`;
        params.push(limit);
      }
    
      const rows = db.prepare(sql).all(...params) as NoteRow[];
      return rows.map((r) => ({
        ...r,
        is_pinned: Boolean(r.is_pinned),
      }));
    }
  • src/index.ts:19-40 (registration)
    The registration of the 'list_notes' MCP tool and its handler invocation in src/index.ts.
    // --- list_notes ---
    server.tool(
      "list_notes",
      "List notes from Apple Notes. Returns title, folder, dates, pinned status, snippet. Optionally filter by folder name and limit results.",
      {
        folder: z.string().optional().describe("Filter by folder name"),
        limit: z.number().optional().describe("Max number of notes to return"),
      },
      async ({ folder, limit }) => {
        try {
          const notes = listNotes(folder, limit);
          return {
            content: [{ type: "text", text: JSON.stringify(notes, null, 2) }],
          };
        } catch (e: unknown) {
          return {
            content: [{ type: "text", text: `Error: ${(e as Error).message}` }],
            isError: true,
          };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the return fields (title, folder, dates, pinned status, snippet) and optional filtering, but does not disclose critical behavioral traits such as pagination, sorting order, default behavior without parameters, error handling, or authentication requirements. This leaves significant gaps for an agent to use the tool effectively.

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

Conciseness4/5

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

The description is concise and front-loaded, stating the core purpose in the first sentence and adding filtering details in the second. Both sentences earn their place by providing essential information without waste, though it could be slightly more structured for clarity.

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?

Given no annotations and no output schema, the description partially compensates by listing return fields and filtering options. However, it lacks details on behavioral aspects (e.g., pagination, defaults) and does not fully address the complexity of a list operation with siblings like 'search_notes'. It is minimally adequate but has clear gaps.

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 ('folder' and 'limit'). The description adds minimal value by restating the filtering options without providing additional semantics, such as how folder names are matched or the default limit. Baseline 3 is appropriate when the schema does the heavy lifting.

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 action ('List notes from Apple Notes') and the resource ('notes'), specifying it returns title, folder, dates, pinned status, and snippet. It distinguishes from siblings like 'get_note' (singular) and 'search_notes' (likely broader search), but could be more explicit about differentiation from 'search_notes'.

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

Usage Guidelines3/5

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

The description implies usage for listing notes with optional filtering by folder and limit, but does not explicitly state when to use this tool versus alternatives like 'search_notes' or 'get_note'. It provides some context (filtering options) but lacks clear exclusions or named alternatives.

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