Skip to main content
Glama

create_rich_email_draft

Generate rich-text email drafts as .eml files for reliable HTML rendering in Apple Mail, with options to open, save, and customize recipients and content.

Instructions

Create a rich-text email draft by generating an unsent .eml message and optionally opening it in Mail.

This is the preferred path for HTML or richly formatted emails because Mail reliably renders .eml content, while setting raw HTML through AppleScript often stores the literal markup instead.

Args: account: Account name to use for the sender identity (e.g., "Work", "Oracle") subject: Subject line for the draft (optional; defaults to empty) to: Optional recipient email address(es), comma-separated for multiple text_body: Optional plain-text body. If omitted but html_body is provided, a fallback plain body is generated. html_body: Optional HTML body. If omitted but text_body is provided, a basic HTML wrapper is generated. cc: Optional CC recipients, comma-separated for multiple bcc: Optional BCC recipients, comma-separated for multiple output_path: Optional path for the generated .eml file open_in_mail: If True, open the generated .eml in Mail (default: True) save_as_draft: If True, ask Mail to save the opened compose window into Drafts (default: False)

Returns: Confirmation with the generated .eml path, missing details, and Mail-open/save status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYes
subjectNo
toNo
text_bodyNo
html_bodyNo
ccNo
bccNo
output_pathNo
open_in_mailNo
save_as_draftNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full behavioral disclosure burden. It explains the fallback logic between text_body and html_body parameters, default behaviors for open_in_mail (True) and save_as_draft (False), and the file generation mechanism. Minor gap: does not specify file overwrite behavior or error conditions when output_path exists.

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?

Excellent structure with four distinct sections (purpose/rationale, Args, Returns). Information density is high with zero waste—every sentence provides actionable guidance (e.g., explaining why .eml is preferred) or parameter constraints. Technical details (comma-separated, fallback generation) are precisely where needed.

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?

Given 10 parameters with complex interdependencies (text_body/html_body fallbacks) and 0% schema coverage, the description is remarkably complete. It documents all parameters, explains return structure ('Confirmation with the generated `.eml` path'), and covers the output schema existence. No gaps remain for agent invocation decisions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% (titles only), requiring full compensation. The Args section provides rich semantics for all 10 parameters: account includes examples ('Work', 'Oracle'), recipient fields specify comma-separated formatting, body fields explain mutual fallback generation, and booleans clarify default values. Comprehensive coverage of complex parameter interactions.

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?

Description explicitly states the tool generates unsent `.eml` messages for rich-text emails, using specific verbs (create/generate) and resource identifiers. It clearly distinguishes itself from sibling `compose_email` by explaining this is the 'preferred path for HTML or richly formatted emails because Mail reliably renders `.eml` content, while setting raw HTML through AppleScript often stores the literal markup instead.'

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?

Provides explicit when-to-use guidance by contrasting with AppleScript alternatives: 'This is the preferred path for HTML or richly formatted emails.' It explains the technical rationale (reliable rendering vs. literal markup storage), giving agents clear criteria for selecting this tool over `compose_email` or other siblings.

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/patrickfreyer/apple-mail-mcp'

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