# delete_group

> 這個 AirBuild MCP 工具會為所有人刪除一個群組聊天及其完整記錄。

Source: https://air.build/tw/docs/mcp-tools/delete_group/

`delete_group` 會為所有人刪除一個群組聊天：它的訊息、成員席位、圖片和背景圖片。刪除後無法復原。它只刪除群組聊天：專案的聊天會隨專案一起刪除（[delete_project](https://air.build/tw/docs/mcp-tools/delete_project/)），私訊則永遠不會被刪除。若要離開群組而不為其他人刪除它，請在 [remove_channel_member](https://air.build/tw/docs/mcp-tools/remove_channel_member/) 中填入你自己。團隊中的任何人都可以呼叫，已封存的群組也可以刪除。

| 唯讀 | 破壞性 | 冪等 |
| --- | --- | --- |
| 否 | 是 | 是 |

## 輸入

| 輸入 | 類型 | 必填 | 預設值 | 作用 |
| --- | --- | --- | --- | --- |
| `teamId` | 字串（UUID） | 是 | — | 團隊，來自 [list_teams](https://air.build/tw/docs/mcp-tools/list_teams/) |
| `channelId` | string | 是 | — | 群組，`grp.<uuid>`，來自 [list_channels](https://air.build/tw/docs/mcp-tools/list_channels/) |

## 結果

| 欄位 | 說明 |
| --- | --- |
| `deleted` | `true` |

```json
{ "deleted": true }
```

## 錯誤

| 訊息 | 何時出現 | 處理方式 |
| --- | --- | --- |
| This is a project's channel: rename or delete the project instead. | `channelId` 是專案的聊天 | 用 [delete_project](https://air.build/tw/docs/mcp-tools/delete_project/) 刪除該專案 |
| A direct message cannot be renamed or deleted. | `channelId` 是私訊頻道 | 私訊會保留 |
| Channel not found. | 這個團隊中沒有該群組，或它已被刪除 | 用 [list_channels](https://air.build/tw/docs/mcp-tools/list_channels/) 查看：如果不在清單中，就表示已經刪除 |
| Team not found. | 團隊不存在，或你不在其中 | 使用 [list_teams](https://air.build/tw/docs/mcp-tools/list_teams/) 傳回的 `teamId` |

所有工具都可能傳回的錯誤，請參閱 [伺服器與登入](https://air.build/tw/docs/mcp-tools/server/#errors)。

## 範例

```json
{"name": "delete_group", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "channelId": "grp.00000000-0000-0000-0000-000000000000"}}
```
