Skip to main content
Glama

create_rich_email_draft

Create a rich-text email draft as a .eml file and optionally open it in Mail. Supports HTML or plain text bodies, multiple recipients, and CC/BCC.

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) from_address: Optional sender address to stamp into the .eml From: header. Must be one of the account's configured email addresses. When omitted, Mail fills the account's default "Send new messages from" address on open.

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
from_addressNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Even without annotations, the description thoroughly discloses behavioral traits: it generates an unsent .eml, optionally opens in Mail, handles fallback between text_body and html_body, and explains from_address requirements with default behavior. It also warns about the AppleScript limitation, adding transparency beyond the schema.

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?

The description is well-structured with a clear summary, rationale, parameter list, and return info. It is comprehensive but slightly lengthy due to the 11 parameters. Every sentence adds value, making it efficient for its complexity; a 4 is appropriate for being thorough without excessive redundancy.

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

Completeness4/5

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

Given the tool's complexity (11 parameters, interdependencies, output schema), the description covers most aspects: fallback between text and HTML, from_address constraints, and Mail open/save behavior. However, it could clarify behavior when both bodies are omitted and the exact meaning of 'missing details' in the return. Still, it is largely complete.

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?

With 0% schema coverage, the description fully compensates by explaining each of the 11 parameters in detail. It provides examples (e.g., account 'Work' or 'Oracle'), specifies defaults (e.g., subject defaults to empty), and clarifies conditional logic (e.g., fallback generation when one body is omitted). This adds significant meaning beyond the plain 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 clearly states the tool creates a rich-text email draft by generating an unsent .eml file and optionally opening it in Mail. It distinguishes itself from alternatives like compose_email by noting that .eml is preferred for HTML emails due to reliable rendering, which prevents the AppleScript HTML injection issue.

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

Usage Guidelines4/5

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

The description provides strong usage guidance by stating it is the preferred path for HTML or richly formatted emails, implying a distinction from plain-text email tools. However, it does not explicitly name alternative sibling tools like compose_email for plain text, missing an opportunity for clearer when-to-use vs when-not-to-use.

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