get_ui_context
Capture the current UI state of an Android or iOS app, returning a compressed screenshot and a list of interactive elements with properties. Specify platform, device, and filters to target specific UI components.
Instructions
Capture the current UI state including screenshot and interactive elements. Returns a compressed screenshot and a list of UI elements with their properties.
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": {
"platform": "<platform>"
},
"name": "get_ui_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Target platform | |
| deviceId | No | Device ID or name (optional, uses first running device if not specified) | |
| includeAllElements | No | Include all elements, not just interactive ones (default: false) | |
| maxDepth | No | Maximum depth to traverse in UI hierarchy (default: 20) | |
| screenshotQuality | No | Screenshot JPEG quality 1-100 (default: 50) | |
| skipScreenshot | No | Skip screenshot capture for faster response (default: false) | |
| elementTypes | No | Filter to specific element types |