所有工具

create_draft

电子邮件 · macOS

效果: 写入. 状态: 受限可用.

“受限可用”表示工具可能取决于版本、平台、权限、账户或配置,并不表示它在所有安装中都已启用。

macOS

用途

将电子邮件保存到 Mail.app 的“草稿”文件夹,供用户检查并手动发送;它绝不会发送邮件。可使用 `to`/`subject` 与 `body` 或 `html_body` 撰写新草稿,也可使用 `reply_to_message_id`、`reply_all` 与 `body` 或 `html_body` 保存原生回复;响应会给出“草稿”邮箱和主题。回复草稿的响应包含 `threaded`:true 表示已回读保存的草稿,且其标头引用源邮件(它会显示在会话内);false 表示保存时不含会话串标头(请将警告转告用户);“unconfirmed”表示未能及时回读(例如 Exchange 同步延迟)。在多账户 Mac 上,传入 `account`(来自 list_email_accounts 的账户名称)或 `from`(发件人地址),可将草稿放入该账户的“草稿”;否则会放入默认账户。通过 `attachments` 传入以逗号分隔的绝对文件路径(例如 PDF 报价单)即可附加文件,文件会附加到保存的草稿。适合希望由 AI 撰写邮件但坚持自行发送的谨慎用户。实际保存必须提供 confirm=true;否则只返回预览,不会改动 Mail.app。

必填输入

此平台的架构未声明必填输入,但仍可能存在可选选择器或运行时要求。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构macOS
{
  "properties": {
    "account": {
      "description": "Account name (from list_email_accounts) whose Drafts folder receives the draft. Alternative to `from`.",
      "type": "string"
    },
    "attachments": {
      "description": "Files to attach, as comma-separated absolute paths (e.g. a PDF).",
      "type": "string"
    },
    "bcc": {
      "description": "BCC address(es), comma-separated.",
      "type": "string"
    },
    "body": {
      "description": "Plain-text body of the draft.",
      "type": "string"
    },
    "cc": {
      "description": "CC address(es), comma-separated.",
      "type": "string"
    },
    "confirm": {
      "default": "false",
      "description": "Must be true to actually save the draft. Without it, returns a preview of the recipient/sender, subject, and that the body will be saved.",
      "type": "boolean"
    },
    "from": {
      "description": "Sender address — on a multi-account Mac, selects which account's Drafts to use. Alternative to `account`.",
      "type": "string"
    },
    "html_body": {
      "description": "HTML body of the draft. Takes precedence over `body` when both are given.",
      "type": "string"
    },
    "reply_all": {
      "default": "false",
      "description": "For a reply draft, include all original recipients (reply-all) instead of just the sender.",
      "type": "boolean"
    },
    "reply_to_message_id": {
      "description": "Message id (from list_emails/search_emails) to draft a reply to, instead of a new message.",
      "type": "string"
    },
    "subject": {
      "description": "Subject line for a new draft. Ignored for reply drafts (they inherit the original subject).",
      "type": "string"
    },
    "to": {
      "description": "Recipient address(es) for a new draft, comma-separated. Omit for a reply draft (uses reply_to_message_id).",
      "type": "string"
    }
  },
  "type": "object"
}

文档示例

create_draft 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "body": "Can we review the launch checklist on Tuesday?",
  "confirm": false,
  "subject": "Planning meeting",
  "to": "[email protected]"
}