simulator_screen
The MCP tool that returns the size of the Team's Simulator's screen, the coordinate space that taps, swipes and the accessibility tree use.
simulator_screen returns the size of the Team’s running Simulator’s screen in the coordinate space every other Simulator tool uses. It is read-only. Call it before sending coordinates by hand, to know where the edges are.
| Read-only | Destructive | Idempotent |
|---|---|---|
| Yes | No | Yes |
Screen coordinates
Every x, y (and startX … endY) a Simulator tool takes or returns is in screen coordinates:
- the unit is the screen point, not the screenshot’s pixel: a screenshot is usually two or three times larger;
0, 0is the top-left corner of the screen andxgrows to the right,ydownwards, up to thewidthandheightthis tool returns;- they stay in the device’s portrait frame whatever its orientation: after simulator_rotate the same point of the glass keeps the same coordinates;
- the
frameof every element in simulator_describe_ui and simulator_find is in the same space, so the center of a frame (x + width / 2,y + height / 2) can be tapped as it is; - on a foldable they belong to the display in use; simulator_tap and simulator_swipe can address another display with
display, ascreenIdfrom simulator_displays.
Where a tool takes an element instead of coordinates, prefer the element: it follows the layout when it moves (see simulator_find).
Inputs
| Input | Type | Required | Default | What it does |
|---|---|---|---|---|
teamId |
string (UUID) | Yes | — | The Team, from list_teams |
simulator |
string | No | The Team’s default device | Which device, by id from list_simulators |
Result
| Field | What |
|---|---|
screen.rect.width |
The screen’s width in points |
screen.rect.height |
The screen’s height in points |
screen.rect.x, screen.rect.y |
On some devices: where the screen sits inside the picture of the whole device. Coordinates for input still start at 0, 0 |
{ "screen": { "rect": { "width": 402, "height": 874 } } }Errors
Only the errors every Simulator tool can return: see start_simulator.
Example
{"name": "simulator_screen", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000"}}