simulator_terminate_app
这个 MCP 工具按 bundle ID 退出团队模拟器上正在运行的 App。
simulator_terminate_app 按 bundle ID 退出团队正在运行的模拟器上正在运行的 App。App 仍保持安装并保留其数据;可以用 simulator_launch_app 再次启动它,例如用来测试冷启动。再次调用不会有影响。
| 只读 | 破坏性 | 幂等 |
|---|---|---|
| 否 | 否 | 是 |
输入
| 输入 | 类型 | 必填 | 默认值 | 作用 |
|---|---|---|---|---|
teamId |
字符串(UUID) | 是 | — | 团队,来自 list_teams |
simulator |
string | 否 | 团队的默认设备 | 哪种设备,使用 list_simulators 中的 id |
bundleId |
string | 是 | — | App 的 bundle ID,来自 simulator_apps |
结果
| 字段 | 说明 |
|---|---|
ok |
true |
{ "ok": true }错误
| 消息 | 何时出现 | 怎么办 |
|---|---|---|
| bundleId is required. | 缺少 bundleId,或它为空 |
发送 bundle ID |
另外还有每个模拟器工具都可能返回的错误:见 start_simulator。
示例
{"name": "simulator_terminate_app", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "bundleId": "com.example.notes"}}