# simulator_rotate

> 這個 MCP 工具會把團隊的模擬器轉為直向、橫向或上下顛倒。

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

`simulator_rotate` 會把團隊正在執行的模擬器轉到某個方向。方向是絕對的，而不是從目前方向轉動，所以重複呼叫不會有影響。不會旋轉的螢幕（例如 iPhone 的主畫面）會維持原狀。裝置仍然已經轉動，下一個會旋轉的 App 會跟著它。座標不會隨之改變：每個工具都會繼續使用裝置的 [直向框架](https://air.build/tw/docs/mcp-tools/simulator_screen/#coordinates)。裝置是共用的，所以轉動會對所有使用它的人顯示。

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

## 輸入

| 輸入 | 類型 | 必填 | 預設值 | 作用 |
| --- | --- | --- | --- | --- |
| `teamId` | 字串（UUID） | 是 | — | 團隊，來自 [list_teams](https://air.build/tw/docs/mcp-tools/list_teams/) |
| `simulator` | string | 否 | 團隊的預設裝置 | 哪種裝置，使用 [list_simulators](https://air.build/tw/docs/mcp-tools/list_simulators/#result) 中的 `id` |
| `orientation` | 字串：`portrait`、`landscape-left`、`landscape-right`、`portrait-upside-down` | 是 | — | 要轉到的方向 |

## 結果

| 欄位 | 說明 |
| --- | --- |
| `ok` | `true` |
| `orientation` | 要求的方向 |

```json
{ "ok": true, "orientation": "landscape-left" }
```

## 錯誤

| 訊息 | 何時出現 | 處理方式 |
| --- | --- | --- |
| orientation is required. | 缺少 `orientation` | 傳送其中一個 |
| orientation must be one of portrait, landscape-left, landscape-right, portrait-upside-down. | 其他值 | 使用以下之一 |

另外還有每個模擬器工具都可能傳回的錯誤：請參閱 [start_simulator](https://air.build/tw/docs/mcp-tools/start_simulator/#device-errors)。

## 範例

```json
{"name": "simulator_rotate", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "orientation": "landscape-left"}}
```
