notes_createRawHtml
Generate Apple Notes directly from raw HTML content by specifying a title and formatted HTML, enabling automated note creation within macOS.
Instructions
[Apple Notes operations] Create a new note with direct HTML content
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | Raw HTML content for the note | |
| title | Yes | Title of the note |
Implementation Reference
- src/categories/notes.ts:171-178 (handler)Handler function that destructures title and html from args, escapes double quotes in HTML content, and generates AppleScript to create a new note in the Apple Notes application with the specified title and raw HTML body.script: (args) => { const { title = "New Note", html = "" } = args; return ` tell application "Notes" make new note with properties {body:"${html.replace(/"/g, '\\"')}", name:"${title}"} end tell `;
- src/categories/notes.ts:180-193 (schema)Input schema validating the tool parameters: title (optional string) and required html (string for raw HTML content).schema: { type: "object", properties: { title: { type: "string", description: "Title of the note" }, html: { type: "string", description: "Raw HTML content for the note" } }, required: ["title", "html"] }
- src/index.ts:35-35 (registration)Registration of the notesCategory (containing the createRawHtml script) to the MCP server via addCategory method. The tool is exposed as 'notes_createRawHtml' due to framework prefixing.server.addCategory(notesCategory);
- src/framework.ts:224-224 (registration)Framework code that constructs the full tool name by prefixing category name with underscore and script name, resulting in 'notes_createRawHtml' for listing tools.name: `${category.name}_${script.name}`, // Changed from dot to underscore