Skip to main content
Glama
Apple Notes MCP Server
by sweetrb

add-attachment-from-pasteboard

Attach a copied image, PDF, or file directly to a specific Apple Note by reading the pasteboard and saving the verified bytes to that note.

Instructions

Use when: the user copied an image, a PDF, or a file (screenshot, Copy Image, Finder Copy) and wants it attached to an exact note. Returns: the add-attachment result (attachment id, bytes, name, content hash) plus source: what was taken from the pasteboard (kind, type, default filename). Do not use when: the pasteboard holds text (use append-to-note), several copied files (refused; use add-attachment per file), or you have a file path (use add-attachment). Safety: checks the note and revision before reading the pasteboard; reads nothing when macOS would show its paste alert unless allowPasteAlert is true (error pasteboardCode pasteboard_access_denied); reads the pasteboard once and freezes its bytes into a private temporary file before attaching, never writes to the pasteboard, then runs add-attachment's checks: fresh rich revision, at most 64 MiB, no insertion retry, existing content and exact bytes verified. Needs the MCP host to run in the logged-in GUI session.

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>"
    },
    "name": "add-attachment-from-pasteboard"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
filenameNoName the attachment gets in Notes (default: the copied file's name, or "Pasted image.png" / "Pasted document.pdf"). Without an extension, the pasted type's extension is added; with one, it must match the pasted type. Same rules as add-attachment otherwise.
allowPasteAlertNoRead the pasteboard even if macOS will show its paste alert (macOS 15.4+ paste privacy). Default false: when pasting is not already always allowed, the tool reads nothing and returns pasteboardCode pasteboard_access_denied. Set true only after the user agrees to answer the alert. Never overrides a Deny setting.
expectedContentHashYes

Output Schema

NameRequiredDescriptionDefault
okNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.11

TDQS

A4.6/5.0
Behavior5/5

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

Annotations supply only readOnlyHint=false, so the description carries the behavioral burden and does: pre-read note/revision checks, the macOS paste-alert gate with its error code (pasteboardCode pasteboard_access_denied), single pasteboard read frozen to a private temp file, no writes to pasteboard, 64 MiB cap, no insertion retry, byte verification, and the GUI-session requirement. This is exactly the 'what gets destroyed / what can fail / what environment is needed' context an agent needs for a mutation.

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?

Front-loaded and clearly sectioned into Use when / Returns / Do not use when / Safety, so the agent can scan the deciding clause first. The Safety paragraph is dense and long-sentenced, and the filename rule retreads the schema, keeping this short of a 5.

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 4-parameter mutation with an output schema, this covers selection, failure modes, limits, environment prerequisites and side effects; return values are summarized even though an output schema exists. Nothing an agent needs to call it correctly is missing.

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%, and the two documented parameters (filename, allowPasteAlert) are already described in the schema; the description mostly echoes them. It does add a small amount—filename defaulting to the copied name and the pasteboard_access_denied outcome when allowPasteAlert is false—but id and expectedContentHash are only indirectly implied by 'checks the note and revision before reading the pasteboard'. Baseline 3 for partial compensation.

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?

States a specific verb+resource ('attach' a copy/pasted image, PDF, or file 'to an exact note') and scopes it to pasteboard-sourced content, which is exactly what distinguishes it from add-attachment (path-based) and append-to-note (text). An agent can route on this alone.

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?

Explicit 'Use when' and 'Do not use when' clauses name the disqualifying conditions (text on pasteboard, multiple files, a file path) and point to the correct alternative for each. Nothing about selection is left to inference.

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