Skip to main content
Glama
Dan8Oren

mcp-apple-notes

list-folders

List all Apple Notes folders with full paths and note counts to organize and navigate your notes efficiently.

Instructions

List all Apple Notes folders with full paths and note counts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler logic for 'list-folders' tool: calls getFolders() and returns the folder data.
    } else if (name === "list-folders") {
      const folders = await getFolders();
      return createJsonResponse({ ok: true, data: folders });
  • The getFolders() helper function executed by the handler. Uses JXA (AppleScript) to query Apple Notes folders and return their name, path, and noteCount.
    const getFolders = async () => {
      const result = await verboseRunJxa(`
        ${jxaGetFolderPath}
        const app = Application('Notes');
        app.includeStandardAdditions = true;
        const folders = Array.from(app.folders());
        return JSON.stringify(folders.map(f => ({
          name: f.name(),
          path: getFolderPath(f) + '/' + f.name(),
          noteCount: f.notes().length
        })));
      `);
    
      return JSON.parse(result as string) as { name: string; path: string; noteCount: number }[];
    };
  • index.ts:193-201 (registration)
    Tool registration metadata: declares the 'list-folders' tool with its name, description, and empty inputSchema (no parameters required).
    {
      name: "list-folders",
      description: "List all Apple Notes folders with full paths and note counts",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Shared JXA helper used by getFolders() to construct full folder paths by walking up the container hierarchy.
    const jxaGetFolderPath = `
      function getFolderPath(item) {
        var parts = [];
        var current = item;
        while (true) {
          try {
            var c = current.container();
            parts.unshift(c.name());
            current = c;
          } catch(e) { break; }
        }
        return parts.join('/');
      }
    
      function getNoteFolderPath(note) {
        var folder = note.container();
        return getFolderPath(folder) + '/' + folder.name();
      }
    `;
Behavior4/5

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

With no annotations, the description carries the full burden. It accurately describes the tool as listing folders with paths and counts, implying a read-only operation. However, it does not disclose potential limitations like hidden folders or performance characteristics.

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 a single, clear sentence that conveys the essential information without unnecessary words. Every word contributes to understanding the tool's purpose.

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

Completeness4/5

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

Given the lack of output schema and simple read-only nature, the description is mostly complete. It would benefit from mentioning whether hidden folders are included, but it adequately covers the main output: folder paths and note counts.

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

Parameters4/5

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

The tool has no parameters, so the description does not need to add parameter-specific meaning. The schema coverage is 100%, and the description appropriately omits parameter details.

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 tool lists all Apple Notes folders, specifically including full paths and note counts. This distinctively separates it from sibling tools like 'list-notes' which list notes, not folders.

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 the tool is for retrieving folder structure, but it does not explicitly state when to use it over alternatives or provide exclusions. Given the sibling tools, the use case is somewhat obvious, yet lacking explicit guidance.

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

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