Skip to main content
Glama

create_folder

Create new folders in Apple Notes to organize your notes and documents. Use this tool to structure your note collection by adding named folders for better content management.

Instructions

Create a new folder in Apple Notes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the folder to create

Implementation Reference

  • Handler for the 'create_folder' tool. Parses the folder name argument, runs AppleScript via runAppleScript helper to create a new folder in Apple Notes, and returns success message.
    case 'create_folder': {
      const { name: folderName } = z.object({ name: z.string() }).parse(args);
      const script = `
        tell application "Notes"
          make new folder with properties {name:"${folderName}"}
          return "Folder '${folderName}' created successfully"
        end tell
      `;
      
      const result = await runAppleScript(script);
      return {
        content: [
          {
            type: 'text',
            text: result,
          },
        ],
      };
    }
  • Tool registration in listTools handler, defining name, description, and input schema for 'create_folder' requiring 'name' string.
    {
      name: 'create_folder',
      description: 'Create a new folder in Apple Notes',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Name of the folder to create'
          }
        },
        required: ['name']
      },
    }
  • Inline Zod schema validation for create_folder input arguments.
    const { name: folderName } = z.object({ name: z.string() }).parse(args);
  • Shared helper function runAppleScript used by create_folder (and other tools) to execute AppleScript safely via temporary files and osascript.
    async function runAppleScript(script: string): Promise<string> {
      try {
        // Write script to temporary file to avoid shell escaping issues
        const tempFile = join(tmpdir(), `applescript-${Date.now()}.scpt`);
        writeFileSync(tempFile, script, 'utf8');
        
        try {
          const { stdout } = await execAsync(`osascript "${tempFile}"`);
          return stdout.trim();
        } finally {
          unlinkSync(tempFile);
        }
      } catch (error: any) {
        throw new McpError(ErrorCode.InternalError, `AppleScript error: ${error.message}`);
      }
    }
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 of behavioral disclosure. It states the tool creates a folder, implying a write operation, but lacks details on permissions, error handling, whether the folder name must be unique, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

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 mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context such as return values, error conditions, or behavioral nuances (e.g., folder naming rules). Given the complexity of a create operation, this leaves significant gaps for an AI agent to use the tool effectively.

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?

The input schema has 100% description coverage, with the 'name' parameter fully documented in the schema. The description does not add any additional meaning or context beyond what the schema provides, such as naming constraints or examples. Given the high schema coverage, a baseline score of 3 is appropriate.

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 ('Create a new folder') and the target resource ('in Apple Notes'), which is specific and unambiguous. However, it does not explicitly differentiate this tool from its sibling 'list_folders', which handles reading rather than creating folders, leaving room for slight improvement.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., permissions), when not to use it, or how it relates to siblings like 'list_folders' for checking existing folders, which is a significant gap for effective tool selection.

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/tdisawas0github/mcp'

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