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"}}