Skip to main content
Glama
Apple Notes MCP Server
by sweetrb

add-attachment

Attach a local file to an exact Apple Note without replacing its body, with byte verification and duplicate removal.

Instructions

Use when: adding one local file to an exact note without replacing its body. Returns: the new attachment id, byte count, attachment name, and post-write content hash after exact byte verification. Do not use when: reading or exporting an existing attachment. Safety: reads only a regular file in home, temp or /Volumes, refusing hidden paths (~/.ssh, .env) and ~/Library outside iCloud Drive and CloudStorage unless the server sets APPLE_NOTES_MCP_ALLOW_PRIVATE_CONTENT_PATHS=1; requires a fresh rich revision, copies at most 64 MiB through a private temporary file, never retries insertion, removes the duplicate copy Notes.app's AppleScript inserts (#321), and verifies existing content plus fetched bytes. On macOS 27 Notes' AppleScript does not list PDF attachments; with Full Disk Access the new attachment is verified through the read-only NoteStore database instead (verifiedBy: database), otherwise the outcome is reported as uncertain. A PDF that Notes shows twice cannot be cleaned up and is reported as an error: delete the extra copy in Notes.app.

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>",
      "expectedContentHash": "<expectedContentHash>",
      "path": "<path>"
    },
    "name": "add-attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
pathYesAbsolute path of the local regular file to attach, in home, temp or /Volumes; hidden paths and ~/Library (except iCloud Drive and CloudStorage) are refused
filenameNoName the attachment gets in Notes instead of the source file's name. One path component with the source file's extension; no slash, colon, or control characters, and no leading dot.
expectedContentHashYes

Output Schema

NameRequiredDescriptionDefault
okNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.11

TDQS

A4.4/5.0
Behavior5/5

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

With only readOnlyHint=false supplied, the description carries the full burden and does so exceptionally well: path restrictions, 64 MiB cap, no retry behavior, duplicate-copy cleanup, byte verification, PDF caveats, and uncertain-outcome reporting are all disclosed. It also explains failure handling and macOS 27-specific behavior.

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 front-loaded with Use when / Returns / Do not use when / Safety, which makes it easy to scan despite its length. The safety paragraph is dense and version-specific, but most sentences earn their place given the tool's mutation and verification complexity.

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?

For a risky mutation with path restrictions, verification, duplicate-cleanup behavior, and known Notes.app edge cases, the definition covers what an agent needs to invoke it correctly. The return values are also described even though an output schema exists, leaving no major behavioral gap.

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 coverage is 50%, with path and filename already described in the schema. The description adds context for the 'exact note' and content-verification flow, but does not explicitly explain the accepted id formats or the expectedContentHash parameter's role beyond implying a fresh revision and byte verification.

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 specific verb and resource: adding one local file to an exact note, explicitly scoped as not replacing its body. This distinguishes it clearly from pasteboard attachment, fetch/export, and append operations without needing to inspect other schemas.

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?

It gives explicit 'Use when' and 'Do not use when' guidance, including the key local-file and non-reading/exporting boundaries. It does not name the pasteboard or fetch/export siblings directly, but the conditions are clear enough to route most calls.

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