get_viewport
Capture a device screenshot and retrieve its dimensions to compute accurate tap coordinates for UI automation.
Instructions
Capture screenshot of a device. Returns the image (resized to ~800px width for efficiency) and metadata with both resized and original dimensions. Use originalWidth/originalHeight for coordinate calculations when tapping. For Android, if logicalWidth/Height are provided, they represent the UI coordinate system which may differ from the physical screenshot pixels.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"deviceId": "<deviceId>",
"platform": "<platform>"
},
"name": "get_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | Yes | ||
| platform | Yes |