MCP 工具

这个 MCP 工具列出团队模拟器的显示屏、正在使用的是哪一个,以及折叠设备的铰链角度。

simulator_displays 列出团队正在运行的模拟器的显示屏,并说明正在使用的是哪一个。在 iPhone Duo 这样的折叠设备上,它还会给出铰链角度以及哪块面板亮着。它是只读的。手机只有一块显示屏。折叠设备有两块:外屏和内屏。把显示屏的 screenId 作为 simulator_tap、simulator_swipe 和 simulator_input 的 display 输入,即可把输入发送到该显示屏。省略时,输入发送到正在使用的显示屏。调用 simulator_fold 后,请反复调用它,直到 active 发生变化:这最多可能需要 3 秒。

只读 破坏性 幂等
是 否 是

输入

输入 类型 必填 默认值 作用
teamId 字符串(UUID) 是 — 团队,来自 list_teams
simulator string 否 团队的默认设备 哪种设备,使用 list_simulators 中的 id

结果

字段 说明
ok true
displays 每块显示屏一项
displays[].screenId 显示屏的 ID
displays[].name 它的名称
displays[].active 设备当前正在使用的显示屏为 true
displays[].integrated 内置于设备的显示屏为 true
displays[].width, displays[].height 面板的像素尺寸,旋转之前
displays[].scale 每点的像素数
displays[].quarterTurnsCw 从面板的安装方向转到竖直方向需要顺时针转动的四分之一圈数(0 到 3)
hinge 仅折叠设备有;否则为 null
hinge.degrees 铰链角度,0 为合上,180 为展平;设备报告之前为 null
hinge.litPanel primary(外屏)或 secondary(内屏);设备无法判断时为 null
{
  "ok": true,
  "displays": [
    { "screenId": 1, "name": "Cover", "active": false, "integrated": true, "width": 1398, "height": 2034, "scale": 3, "quarterTurnsCw": 0 },
    { "screenId": 3, "name": "Inner", "active": true, "integrated": true, "width": 2006, "height": 2852, "scale": 3, "quarterTurnsCw": 1 }
  ],
  "hinge": { "degrees": 180, "litPanel": "secondary" }
}

错误

每个模拟器工具都可能返回的错误:见 start_simulator。

示例

{"name": "simulator_displays", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000"}}