Skip to main content
Glama
Apple Notes MCP Server
by sweetrb

delete-folder-by-id

Destructive

Safely delete one exact, empty Apple Notes folder by ID using a dry-run plan, then apply with revision and identity guards; refuses non-empty and system folders.

Instructions

Use when: deleting one exact, empty, ordinary folder by id, with a plan-then-apply handshake. Returns: a plan (status planned, wouldDelete, identity fields, zero counts, revision) or, on apply, status deleted with verified readback. Do not use when: the folder holds notes or subfolders, or you only have a name or path (delete-folder). Safety: requires the exact id plus expectedName, expectedAccountId, and expectedParentId or expectedRoot. Call with dryRun true, then repeat the same guards with dryRun false and expectedRevision. Always refuses Recently Deleted, smart folders, the account's default and other system folders, shared folders, and non-empty folders; there is no override. Not atomic: the guard is a pre-check followed by an AppleScript delete. The Notes.app-visible checks repeat inside the delete script, but folder type is read from the local store just before it. Needs Full Disk Access and fails closed without it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>",
      "expectedName": "<expectedName>",
      "expectedAccountId": "<expectedAccountId>",
      "dryRun": "<dryRun>"
    },
    "name": "delete-folder-by-id"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesExact folder id (x-coredata://…/ICFolder/pN) from list-folders, or the folder's Notes UUID or numeric key
dryRunYestrue plans and returns a revision; false applies with expectedRevision
expectedNameYesCurrent folder name (not a path), matched case-sensitively
expectedRootNoPass true when the folder sits at the account root (no parent folder)
expectedParentIdNoCurrent parent folder id; omit and pass expectedRoot for a top-level folder
expectedRevisionNoThe revision returned by the dry run; required when dryRun is false
expectedAccountIdYesOwning account id, from get-folder-by-id or list-accounts

Output Schema

NameRequiredDescriptionDefault
okNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.11

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the destructiveHint and non-idempotent annotations, the description discloses the dry-run/apply handshake, revision requirement, refusal rules, absence of override, non-atomic guard behavior, and Full Disk Access dependency. This is substantial operational context that an agent could not infer from annotations alone.

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 dense but well structured with labeled sections for usage, return behavior, exclusions, and safety. For a destructive operation with multiple safeguards, every sentence carries relevant information and the critical constraints are front-loaded.

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

Completeness5/5

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

Given the complexity of a guarded destructive delete, the description covers prerequisites, refusal cases, atomicity limits, permission requirements, and apply-step revision handling. An output schema exists, so the brief return summary is sufficient without needing exhaustive response-field details.

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?

Schema coverage is 100%, so the schema already documents each parameter. The description adds useful meaning by explaining that the guard fields must repeat between dry run and apply, that expectedRevision comes from the dry run, and that expectedParentId or expectedRoot selects the parent context.

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 states a precise verb and resource: deleting one exact, empty, ordinary folder by id. It also explicitly distinguishes this from delete-folder when only a name or path is available, so an agent can select the right sibling without opening schemas.

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

Usage Guidelines5/5

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

It gives explicit 'Use when' and 'Do not use when' sections, including the key exclusions for non-empty folders and name/path-based deletion, and names delete-folder as the alternative for the latter. The plan-then-apply sequence is also stated as required usage.

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

Deploy Server

Other Tools