Skip to main content
Glama

notes_createRawHtml

Create Apple Notes with custom HTML formatting by providing raw HTML content and a title for structured note creation.

Instructions

[Apple Notes operations] Create a new note with direct HTML content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the note
htmlYesRaw HTML content for the note

Implementation Reference

  • The core handler function for the 'notes_createRawHtml' tool. It takes input arguments (title and html), escapes double quotes in the HTML content, and generates an AppleScript string 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
      `;
    },
  • JSON Schema defining the input parameters for the 'notes_createRawHtml' tool: required 'title' (string) and '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"]
    }
  • The tool definition registered within the 'notes' category's scripts array. The full MCP tool name is constructed as 'notes_createRawHtml' by prefixing the category name.
      name: "createRawHtml",
      description: "Create a new note with direct HTML content",
      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
        `;
      },
      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)
    The 'notesCategory' (containing the 'createRawHtml' script) is registered to the MCP server via addCategory, making the tool available.
    server.addCategory(notesCategory);
  • Tool name construction in ListToolsRequestSchema handler: combines category.name + '_' + script.name to form 'notes_createRawHtml'.
    name: `${category.name}_${script.name}`, // Changed from dot to underscore
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates a note, implying a write operation, but doesn't cover permissions, side effects (e.g., if it overwrites existing notes), error handling, or response format. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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 a single, efficient sentence that front-loads the key information ('Create a new note with direct HTML content') without unnecessary words. It earns its place by clearly stating the tool's purpose in a compact form, making it easy to parse quickly.

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

Completeness2/5

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

Given the complexity of a write operation with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after creation (e.g., returns a note ID or confirmation), error conditions, or integration with other tools like 'notes_list'. For a mutation tool, more behavioral context is needed to ensure safe and effective use.

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?

The input schema has 100% description coverage, with clear documentation for both parameters ('title' and 'html'). The description adds minimal value by mentioning 'direct HTML content', which aligns with the 'html' parameter but doesn't provide additional context like formatting examples or constraints. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Create'), resource ('a new note'), and method ('with direct HTML content'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from its sibling 'notes_create', which might create a similar note but potentially with different input formats, leaving some ambiguity about when to choose one over the other.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'notes_create' or other note-related tools. It lacks context about prerequisites, such as whether the user needs to be authenticated or in a specific app state, and doesn't mention any exclusions or typical use cases for HTML-based note creation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joshrutkowski/applescript-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server