Skip to main content
Glama
sweetrb

apple-mail-mcp

by sweetrb

send-email

Sends a single email immediately after explicit confirmation of recipients, subject, and body, with optional CC/BCC, attachments, and reply threading.

Instructions

Use when: the user has explicitly confirmed they want to send a single email now to the given recipients (to/cc/bcc are arrays), optionally with attachments, a chosen transport, and caller-built threading headers (inReplyTo/references, SMTP only). Returns: a confirmation naming the recipients and attachment count; over SMTP, also whether a Sent-folder copy was filed (sentCopy). Do not use when: the user wants to review first (use create-draft), is replying to or forwarding an existing message (use reply-to-message / forward-message — they derive recipients, threading and the quote, and also take attachments), or wants per-recipient personalized copies (use send-serial-email). Safety: this SENDS real email immediately and it cannot be unsent — require explicit user confirmation of the exact recipients, subject, and body before calling. Prefer create-draft when there is any doubt.

Input Schema

NameRequiredDescriptionDefault
ccNoCC recipients
toYes
bccNoBCC recipients
bodyYes
accountNoAccount to send from. AppleScript transport: a Mail account name or an exact sender address, resolved to one address and verified before sending; if it matches no enabled account, or Mail would use a different sender, nothing is sent and an error is returned. Omitted → Mail's default sender (reported back in `from`). SMTP transport: an email-form From override (see README).
replyToNoSMTP only (issue #220): sets the Reply-To header when replies should go somewhere other than the From/login address, e.g. a domain-alias setup where APPLE_MAIL_MCP_SMTP_FROM differs from APPLE_MAIL_MCP_SMTP_USER. Ignored on the AppleScript transport.
subjectYes
inReplyToNoThread this message as a reply: the parent's Message-ID token, angle brackets included (e.g. '<abc123@mail.example.com>'). Emitted verbatim as In-Reply-To, never RFC 2047-encoded. When `references` is omitted, References defaults to [inReplyTo]. Prefer reply-to-message, which derives recipients, threading and the quote from the original for you.
transportNoSend transport. 'smtp' submits clean MIME directly via SMTP, avoiding the macOS 15+ Mail.app <blockquote> wrapping (issue #12); requires APPLE_MAIL_MCP_SMTP_* env config. 'applescript' sends through Mail.app. If omitted, configured SMTP is used unless account is a Mail.app account label (for example 'Work'), which selects AppleScript. Explicit SMTP uses the configured SMTP identity; it does not resolve Mail.app account labels. Without SMTP configuration, use AppleScript.
referencesNoThread chain, oldest first: the parent's own References followed by the parent's Message-ID (each an angle-bracketed token). Emitted verbatim, never RFC 2047-encoded.
attachmentsNoFiles to attach: absolute paths in the configured attachment read roots (e.g. '/Users/me/Documents/report.pdf') and/or inline {filename, contentBase64} objects up to 25 MiB decoded each.
compositionNoOpt in to Mail's visible native editor: inserts only new prose, preserving its signature, HTML quotation and reply ancestry without the AppleScript content setter. Requires an unlocked desktop and existing Accessibility and Automation permissions. Uses Mail.app even when SMTP is configured; cannot be combined with transport=smtp or caller-built threading headers. New messages require an explicit account. Do not interact with Mail or the clipboard while it runs. Failure never falls back to another composition method or sends an unverified message.

Output Schema

NameRequiredDescriptionDefault
okNo
fromNoAppleScript transport: the sender Mail.app used
sentCopyNoSMTP only: whether a best-effort copy was filed to the account's Sent mailbox over IMAP (issue #220). Absent when no configured IMAP account matches the SMTP identity — not a failure, the feature simply wasn't engaged.
messageIdNo
transportNo
recipientsNo
sentCopyErrorNoPresent only when sentCopy is false: why the Sent-folder copy failed.
attachmentCountNo
sentCopyAlreadyFiledNoPresent (true) only when sentCopy is true because the Sent mailbox already held this Message-ID (e.g. Gmail's SMTP files its own copy), so none was appended.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.20.39
    • addedInput schema / properties / composition
      Added value: +{
      +  "const": "native-editor",
      +  "description": "Opt in to Mail's visible native editor: inserts only new prose, preserving its signature, HTML quotation and reply ancestry without the AppleScript content setter. Requires an unlocked desktop and existing Accessibility and Automation permissions. Uses Mail.app even when SMTP is configured; cannot be combined with transport=smtp or caller-built threading headers. New messages require an explicit account. Do not interact with Mail or the clipboard while it runs. Failure never falls back to another composition method or sends an unverified message.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv2.20.31
    • changedInput schema / properties / transport / description
      Previous value: -"Send transport. 'smtp' submits clean MIME directly via SMTP, avoiding the macOS 15+ Mail.app <blockquote> wrapping (issue #12); requires APPLE_MAIL_MCP_SMTP_* env config. 'applescript' sends through Mail.app. If omitted, SMTP is used automatically when APPLE_MAIL_MCP_SMTP_* is configured, otherwise AppleScript."New value: +"Send transport. 'smtp' submits clean MIME directly via SMTP, avoiding the macOS 15+ Mail.app <blockquote> wrapping (issue #12); requires APPLE_MAIL_MCP_SMTP_* env config. 'applescript' sends through Mail.app. If omitted, configured SMTP is used unless account is a Mail.app account label (for example 'Work'), which selects AppleScript. Explicit SMTP uses the configured SMTP identity; it does not resolve Mail.app account labels. Without SMTP configuration, use AppleScript."
  3. Changed6 schema fields changedv2.20.29
    • removedInput schema / properties / references / items / $ref
      Removed value: -"#/properties/inReplyTo"
    • addedInput schema / properties / references / items / description
      Added value: +"Thread this message as a reply: the parent's Message-ID token, angle brackets included (e.g. '<abc123@mail.example.com>'). Emitted verbatim as In-Reply-To, never RFC 2047-encoded. When `references` is omitted, References defaults to [inReplyTo]. Prefer reply-to-message, which derives recipients, threading and the quote from the original for you."
    • addedInput schema / properties / references / items / maxLength
      Added value: +998
    • addedInput schema / properties / references / items / pattern
      Added value: +"^<[^<>\\s@]+@[^<>\\s@]+>$"
    • addedInput schema / properties / references / items / type
      Added value: +"string"
    • addedOutput schema / properties / sentCopyAlreadyFiled
      Added value: +{
      +  "description": "Present (true) only when sentCopy is true because the Sent mailbox already held this Message-ID (e.g. Gmail's SMTP files its own copy), so none was appended.",
      +  "type": "boolean"
      +}
  4. Changed2 schema fields changedv2.20.16
    • changedInput schema / properties / account / description
      Previous value: -"Account to send from"New value: +"Account to send from. AppleScript transport: a Mail account name or an exact sender address, resolved to one address and verified before sending; if it matches no enabled account, or Mail would use a different sender, nothing is sent and an error is returned. Omitted → Mail's default sender (reported back in `from`). SMTP transport: an email-form From override (see README)."
    • addedOutput schema / properties / from
      Added value: +{
      +  "description": "AppleScript transport: the sender Mail.app used",
      +  "type": "string"
      +}
  5. Changed3 schema fields changedv2.20.11
    • addedInput schema / properties / inReplyTo
      Added value: +{
      +  "description": "Thread this message as a reply: the parent's Message-ID token, angle brackets included (e.g. '<abc123@mail.example.com>'). Emitted verbatim as In-Reply-To, never RFC 2047-encoded. When `references` is omitted, References defaults to [inReplyTo]. Prefer reply-to-message, which derives recipients, threading and the quote from the original for you.",
      +  "maxLength": 998,
      +  "pattern": "^<[^<>\\s@]+@[^<>\\s@]+>$",
      +  "type": "string"
      +}
    • addedInput schema / properties / references
      Added value: +{
      +  "description": "Thread chain, oldest first: the parent's own References followed by the parent's Message-ID (each an angle-bracketed token). Emitted verbatim, never RFC 2047-encoded.",
      +  "items": {
      +    "$ref": "#/properties/inReplyTo"
      +  },
      +  "maxItems": 100,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedOutput schema / properties / messageId
      Added value: +{
      +  "type": "string"
      +}
  6. Changed3 schema fields changedv2.18.0
    • addedInput schema / properties / replyTo
      Added value: +{
      +  "description": "SMTP only (issue #220): sets the Reply-To header when replies should go somewhere other than the From/login address, e.g. a domain-alias setup where APPLE_MAIL_MCP_SMTP_FROM differs from APPLE_MAIL_MCP_SMTP_USER. Ignored on the AppleScript transport.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / sentCopy
      Added value: +{
      +  "description": "SMTP only: whether a best-effort copy was filed to the account's Sent mailbox over IMAP (issue #220). Absent when no configured IMAP account matches the SMTP identity — not a failure, the feature simply wasn't engaged.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / sentCopyError
      Added value: +{
      +  "description": "Present only when sentCopy is false: why the Sent-folder copy failed.",
      +  "type": "string"
      +}
  7. Changed2 schema fields changedv2.16.1
    • changedInput schema / properties / attachments / description
      Previous value: -"Files to attach: absolute paths (e.g. '/Users/me/report.pdf') and/or inline {filename, contentBase64} objects up to 25 MiB decoded each."New value: +"Files to attach: absolute paths in the configured attachment read roots (e.g. '/Users/me/Documents/report.pdf') and/or inline {filename, contentBase64} objects up to 25 MiB decoded each."
    • changedInput schema / properties / attachments / items / anyOf
      Previous value: -[
      -  {
      -    "description": "Absolute path to an existing file",
      -    "type": "string"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "contentBase64": {
      -        "description": "Base64-encoded file content (maximum 25 MiB decoded)",
      -        "maxLength": 69905072,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "filename": {
      -        "description": "Filename to give the attachment",
      -        "maxLength": 255,
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "filename",
      -      "contentBase64"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "Absolute path to an existing file in an allowed read root",
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "contentBase64": {
      +        "description": "Base64-encoded file content (maximum 25 MiB decoded)",
      +        "maxLength": 69905072,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "filename": {
      +        "description": "Filename to give the attachment",
      +        "maxLength": 255,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "filename",
      +      "contentBase64"
      +    ],
      +    "type": "object"
      +  }
      +]
  8. Changed2 schema fields changedv2.10.24
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  9. Changed1 schema field changedv2.10.8
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
  10. Addedv2.8.14
  11. Removedv2.8.10
  12. First observedv2.6.1

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden, and it does: it warns the email is sent immediately and cannot be unsent, requires explicit confirmation of exact recipients/subject/body, describes the Sent-folder copy outcome over SMTP, explains transport selection trade-offs (SMTP avoids macOS 15+ blockquote wrapping), and documents composition caveats (unlocked desktop, Accessibility/Automation permissions, no fallback on failure). This is unusually rich behavioral disclosure for a mutation tool.

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?

Labeled sections (Use when / Returns / Do not use when / Safety) make it strongly front-loaded and scannable. Minor waste: the 'Returns' sentence partially duplicates the output schema, and the closing 'Prefer create-draft when there is any doubt' restates the Safety clause.

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 a 12-parameter destructive mutation with no annotations, the description covers the safety profile, transport/account resolution caveats, threading constraints and composition preconditions. With an output schema present, it need not detail return values further, and nothing an agent needs in order to call it safely is missing.

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 description coverage is 75%, so the schema already documents most fields in depth. The description still adds orientation the schema does not frame: that to/cc/bcc are arrays, that attachments are optional, that transport is a chosen option with consequences, and that inReplyTo/references are caller-built and SMTP-only — a useful cross-cutting note even if it restates schema details.

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?

States a specific verb and resource (send a single email now) plus the scope of what can be included: recipients, attachments, transport, caller-built threading headers. It is immediately distinguishable from reply-to-message, forward-message, create-draft and send-serial-email, all of which are named.

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?

Explicit 'Use when' and 'Do not use when' clauses, each routing to a named alternative with the condition that selects it (review first → create-draft; replying/forwarding → reply-to-message / forward-message; per-recipient copies → send-serial-email). Nothing is left to inference.

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