本文へスキップ
すべてのツール

m365_create_draft

Microsoft 365 · macOS · Windows

効果: 書き込み. 状態: 条件付き提供.

「条件付き提供」は、バージョン、プラットフォーム、権限、アカウント、設定に依存する可能性を示し、すべての環境で有効という意味ではありません。

macOS

目的

ユーザーが Microsoft 365 / Outlook アカウントでメールを送信せずに準備したいときに使います。そのアカウントの Drafts フォルダに下書きを保存し、本人が Outlook で確認して送信します。何も送信しません。新規メッセージには subject と body(to と cc は任意)を指定します。返信の下書きには reply_to_id(m365_list_emails、m365_search_emails、m365_read_email で得たメッセージ ID)と body だけを指定します。宛先と件名は元のメッセージから引き継がれます。最初にプレビューを表示し、confirm=true を設定すると下書きを保存します。2 回確認すると下書きが 2 つ保存されます。添付ファイルはありません。Mail.ReadWrite 権限を持つ、接続済みの Microsoft 365 アカウントが必要です。このツールが追加される前に接続されたアカウントは、再接続するまで consent_required を返します。すぐに送信するには m365_send_email または m365_reply_email を使ってください。Mac の Mail アプリの下書きには create_draft を使います。

必須入力

入力名はツールが要求する正確な形式のままです。英語の正規技術定義は下の展開可能なスキーマにあります。

権限と確認

スキーマには明示的な確認パラメータがあります。プレビューを確認し、プラットフォーム契約に従って実操作を承認してください。

英語の正規技術スキーマ — macOS
{
  "properties": {
    "account": {
      "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      "type": "string"
    },
    "body": {
      "description": "The text of the draft, as plain text. Line breaks are kept.",
      "type": "string"
    },
    "cc": {
      "description": "CC email addresses, separated by commas (optional; not with reply_to_id).",
      "type": "string"
    },
    "confirm": {
      "description": "Set to true to save the draft (default: shows a preview only). Nothing is sent in either case.",
      "type": "boolean"
    },
    "reply_to_id": {
      "description": "Message ID to draft a reply to (from m365_list_emails, m365_search_emails or m365_read_email). Leave it out for a new message.",
      "type": "string"
    },
    "subject": {
      "description": "Subject, one line. Required for a new message; not with reply_to_id.",
      "type": "string"
    },
    "to": {
      "description": "Recipient email addresses, separated by commas (optional; not with reply_to_id).",
      "type": "string"
    }
  },
  "required": [
    "body"
  ],
  "type": "object"
}

ドキュメント例

m365_create_draft のドキュメント例です。この例は実行しないでください。表示される引数は架空のデータセットに属します。実際に呼び出す前に実在する識別子を確認し、承認を得てください。

{
  "body": "Can we review the launch checklist on Tuesday?",
  "confirm": false,
  "subject": "Planning meeting",
  "to": "alex@example.com"
}

Windows

目的

Microsoft 365 アカウントの Drafts フォルダに、メールの下書きを作成します。ユーザー自身が確認して送信するためのものです。送信は一切行いません。最初にプレビューを表示し、confirm=true を設定すると下書きを作成します。2 回確認すると下書きが 2 つ作成されます。reply_to_id を指定すると、その下書きはそのメッセージへの返信になり、宛先と件名を引き継ぎます(to、cc、subject は指定しないでください)。このツールが追加される前に接続されたアカウントは、下書きを許可するために再接続(connect_m365_account)が必要です。

必須入力

入力名はツールが要求する正確な形式のままです。英語の正規技術定義は下の展開可能なスキーマにあります。

権限と確認

スキーマには明示的な確認パラメータがあります。プレビューを確認し、プラットフォーム契約に従って実操作を承認してください。

英語の正規技術スキーマ — Windows
{
  "properties": {
    "account": {
      "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      "type": "string"
    },
    "body": {
      "description": "The text of the draft, as plain text. Line breaks are kept.",
      "type": "string"
    },
    "cc": {
      "description": "CC recipients (optional, comma-separated)",
      "type": "string"
    },
    "confirm": {
      "description": "Set to true to create the draft (default: shows preview only)",
      "type": "boolean"
    },
    "reply_to_id": {
      "description": "Message ID to draft a reply to (optional)",
      "type": "string"
    },
    "subject": {
      "description": "Subject. Required unless reply_to_id is given.",
      "type": "string"
    },
    "to": {
      "description": "Recipient email address (comma-separated for multiple). Optional: a draft may have no recipient yet.",
      "type": "string"
    }
  },
  "required": [
    "body"
  ],
  "type": "object"
}

ドキュメント例

m365_create_draft のドキュメント例です。この例は実行しないでください。表示される引数は架空のデータセットに属します。実際に呼び出す前に実在する識別子を確認し、承認を得てください。

{
  "body": "Can we review the launch checklist on Tuesday?",
  "confirm": false,
  "subject": "Planning meeting",
  "to": "alex@example.com"
}