teams_send_message
Microsoft Teams · macOS · Windows
効果: 送信. 状態: 条件付き提供.
「条件付き提供」は、バージョン、プラットフォーム、権限、アカウント、設定に依存する可能性を示し、すべての環境で有効という意味ではありません。
macOS
目的
接続済みの職場または学校の Microsoft 365 アカウント(connect_m365_account)として、Microsoft 365 経由で Microsoft Teams のチャットにテキストメッセージを送信します。chat_id は、必ず同じアカウントの teams_list_chats から取得してください。ID を捏造してはいけません。これは書き込み操作です。最初の呼び出しは、チャットの参加者(または読み取れなかった場合は chat_unresolved)を示すプレビューを返し、2 回目の呼び出し(confirm=true)で実際に送信します。確認する前に、その参加者をユーザーに見せてください。特に participants_state が "resolved" でない場合や has_external_members が true の場合は必須です。sent:true は Microsoft がメッセージを受け付けたことを意味します。teams_search_messages は Microsoft の検索インデックスを読み取るため、送信から遅れることがあります。したがって、送信直後の検索結果が 0 件でも、送信が失敗した証拠にはなりません。
必須入力
chat_idtext
入力名はツールが要求する正確な形式のままです。英語の正規技術定義は下の展開可能なスキーマにあります。
権限と確認
スキーマには明示的な確認パラメータがあります。プレビューを確認し、プラットフォーム契約に従って実操作を承認してください。
- このプラットフォームでは、ユーザーが許可したアプリ、アカウント、リソースだけを使用してください。接続と権限の要件については、このツールのプラットフォーム固有の説明を参照してください。このカタログは、追加の OAuth スコープや OS 権限があるとは主張しません。
英語の正規技術スキーマ — 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"
},
"chat_id": {
"description": "Chat id from teams_list_chats (e.g. '19:<uuid>_<uuid>@unq.gbl.spaces' for 1:1, '19:<id>@thread.v2' for a group)",
"type": "string"
},
"confirm": {
"description": "Must be true to actually send. Without it, returns a preview and sends nothing: the preview reads who is in the chat (`chat`: title, participants, participant_count, participants_state, has_external_members), or says chat_unresolved when that could not be read.",
"type": "boolean"
},
"text": {
"description": "Plain-text message body. Max 28000 chars. No formatting / mentions / attachments.",
"type": "string"
}
},
"required": [
"chat_id",
"text"
],
"type": "object"
}ドキュメント例
teams_send_message のドキュメント例です。この例は実行しないでください。表示される引数は架空のデータセットに属します。実際に呼び出す前に実在する識別子を確認し、承認を得てください。
{
"chat_id": "demo-chat-001",
"confirm": false,
"text": "Can we review the launch checklist on Tuesday?"
}Windows
目的
Graph API を使って Microsoft Teams のチャットにメッセージを送信します。connect_m365_account が必要です。chat_id は teams_list_chats から取得する必要があります。最初の呼び出しはプレビューを返し、チャットの参加者(または読み取れなかった場合は chat_unresolved)が示されます。送信するには confirm=true を設定します。確認する前に、その参加者をユーザーに見せてください。特に participants_state が "resolved" でない場合や has_external_members が true の場合は必須です。
必須入力
chat_idtext
入力名はツールが要求する正確な形式のままです。英語の正規技術定義は下の展開可能なスキーマにあります。
権限と確認
スキーマには明示的な確認パラメータがあります。プレビューを確認し、プラットフォーム契約に従って実操作を承認してください。
- このプラットフォームでは、ユーザーが許可したアプリ、アカウント、リソースだけを使用してください。接続と権限の要件については、このツールのプラットフォーム固有の説明を参照してください。このカタログは、追加の OAuth スコープや OS 権限があるとは主張しません。
英語の正規技術スキーマ — 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"
},
"chat_id": {
"description": "Chat ID from teams_list_chats",
"type": "string"
},
"confirm": {
"description": "Must be true to actually send. Without it, returns a preview and sends nothing: the preview reads who is in the chat (`chat`: title, participants, participant_count, participants_state, has_external_members), or says chat_unresolved when that could not be read.",
"type": "boolean"
},
"text": {
"description": "Plain-text message body",
"type": "string"
}
},
"required": [
"chat_id",
"text"
],
"type": "object"
}ドキュメント例
teams_send_message のドキュメント例です。この例は実行しないでください。表示される引数は架空のデータセットに属します。実際に呼び出す前に実在する識別子を確認し、承認を得てください。
{
"chat_id": "demo-chat-001",
"confirm": false,
"text": "Can we review the launch checklist on Tuesday?"
}