Skip to main content
Glama
Apple Notes MCP Server
by sweetrb

export-notes-html

Exports one note or a folder's notes as a standalone HTML file, embedding assets or writing sidecar files while preserving tables, images, drawings, and attachments in body order.

Instructions

Use when: exporting one note (by exact id) or a folder's notes as one standalone HTML file rendered from the decoded note body, with semantic tables and images, drawings, scans, audio, files and link cards in body order. Returns: a receipt {format, count, bytes, output} plus embedded or sidecar asset counts, attachment counts and skipped notes. The HTML itself is never returned inline. Do not use when: you want Markdown (export-notes-markdown) or a restorable backup (export-notes-json). A folder document is a presentation format, not something to import back. Safety: read-only against Notes; requires Full Disk Access. outputPath is required and create-only ([output_exists] if it exists). Assets are embedded as data URLs (each up to 10 MiB) unless embedAssets is false, which copies them to a sidecar directory (assetsDir, default .assets) with relative URLs and never replaces existing files. No file: URLs or Notes library paths are written; missing assets show a visible unavailable marker. Drawings: by default every drawing keeps Notes' PNG. With vectorDrawings true, classic PencilKit drawings are rendered as SVG through the public native helper (setup --public-helper); Paper drawings keep the PNG. A drawing that cannot be decoded falls back to the PNG and is counted in vectorDrawings.fallbackReasons; it never fails the export.

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": {
      "outputPath": "<outputPath>"
    },
    "name": "export-notes-html"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoExact note ID returned by search-notes, list-notes, or create-note: x-coredata id, Notes UUID, or numeric key
limitNoMaximum notes read from the folder (default 100, max 1000)
folderNoFolder path to export instead of one note (nested paths use '/')
accountNoAccount holding the folder (defaults to Notes.app's default account)
assetsDirNoSidecar directory when embedAssets is false (default <stem>.assets) (absolute; under home, a temp dir, or /Volumes; never inside the Notes library)
outputPathYesHTML file to create (absolute; under home, a temp dir, or /Volumes; never inside the Notes library)
embedAssetsNoEmbed assets as data URLs (default true). False writes a sidecar directory
vectorDrawingsNoRender classic PencilKit drawings as SVG via the public native helper (default false). When false or omitted, Notes' PNG rendering is kept and the helper never runs

Output Schema

NameRequiredDescriptionDefault
bytesNo
countNo
statsNo
assetsNo
formatNo
outputNo
skippedNo
embeddedNo
truncatedNo
vectorDrawingsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.11

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, idempotentHint=false, destructiveHint=false; the description supplies the reasoning an agent needs: read-only against Notes but outputPath is required and create-only, returning [output_exists] rather than overwriting, and no existing sidecar files are ever replaced. It further discloses the 10 MiB per-asset embed cap, that no file: URLs or Notes library paths are written, that missing assets get a visible marker, and that undecodable drawings fall back to PNG with reasons counted rather than failing the export. No behavior is contradicted, and the mutating surface is explained in terms the annotations cannot express.

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?

Structure is strong and front-loaded: labeled blocks for Use when, Returns, Do not use when, Safety, and Drawings, each sentence carrying distinct information. It runs long, with drawing fallback mechanics and error-code asides that are denser than strictly needed for tool selection, though nothing is padding.

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 an 8-parameter export tool with an output schema, the definition covers the remaining gaps: the never-inline HTML return, receipt shape, permission requirement (Full Disk Access), path sandboxing, and the drawing-render tradeoff. An agent has everything needed to call it correctly on the first attempt without trial and error.

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 baseline is 3, but the description adds genuine semantics the schema does not: the interaction between embedAssets and assetsDir (sidecar directory defaulting to <output stem>.assets with relative URLs), the constraint that outputPath must be create-only, and exactly what vectorDrawings=true does versus false/omitted. The id parameter's requirement for an exact id from search-notes/list-notes/create-note is reinforced but largely duplicates the schema.

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 opens with a specific verb (exporting) and resource (one note by exact id, or a folder's notes) plus the output artifact (one standalone HTML file rendered from the decoded note body). It enumerates what the render includes — semantic tables, images, drawings, scans, audio, files, link cards in body order — which is far more than a restatement of the name.

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 an explicit 'Use when' block and an explicit 'Do not use when' block that names the two alternatives (export-notes-markdown, export-notes-json) and the condition selecting each. It also adds a non-obvious exclusion: a folder document is a presentation format not meant for re-import, which prevents a plausible misuse.

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