simulator_rotate
这个 MCP 工具把团队的模拟器转为竖屏、横屏或倒置。
simulator_rotate 把团队正在运行的模拟器转到某个方向。方向是绝对的,而不是从当前方向转动,所以重复调用不会有影响。不会旋转的屏幕(例如 iPhone 的主屏幕)保持原样。设备仍然已经转动,下一个会旋转的 App 会跟随它。坐标不会随之改变:每个工具都继续使用设备的 竖屏框架。设备是共享的,所以转动会对所有使用它的人显示。
| 只读 | 破坏性 | 幂等 |
|---|---|---|
| 否 | 否 | 是 |
输入
| 输入 | 类型 | 必填 | 默认值 | 作用 |
|---|---|---|---|---|
teamId |
字符串(UUID) | 是 | — | 团队,来自 list_teams |
simulator |
string | 否 | 团队的默认设备 | 哪种设备,使用 list_simulators 中的 id |
orientation |
字符串:portrait、landscape-left、landscape-right、portrait-upside-down |
是 | — | 要转到的方向 |
结果
| 字段 | 说明 |
|---|---|
ok |
true |
orientation |
请求的方向 |
{ "ok": true, "orientation": "landscape-left" }错误
| 消息 | 何时出现 | 怎么办 |
|---|---|---|
| orientation is required. | 缺少 orientation |
发送其中一个 |
| orientation must be one of portrait, landscape-left, landscape-right, portrait-upside-down. | 其他值 | 使用以下之一 |
另外还有每个模拟器工具都可能返回的错误:见 start_simulator。
示例
{"name": "simulator_rotate", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "orientation": "landscape-left"}}