Capture or diff the accessibility tree
snapshotCapture the accessibility tree or diff it against the session baseline to detect UI changes. Returns element refs for semantic interactions, with an option to list only actionable elements.
Instructions
Capture the accessibility tree or compare it with the previous session baseline. The result includes refs for semantic interactions; the diff option reports UI changes. interactiveOnly lists only elements you can act on. After an action with settle, take a snapshot only when its diff lacks the next target or did not settle. Times out after 90s; a caller-supplied budget extends it.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | ||
| udid | No | Apple device or simulator UDID. | |
| depth | No | ||
| scope | No | ||
| device | No | Device name; ids go in udid or serial. | |
| record | No | Force-record this out-of-band observation into a repair-armed heal (mutually exclusive with noRecord). Authored replay steps are recorded automatically and never need this. | |
| serial | No | Android, HarmonyOS, or Vega VVD serial. | |
| session | No | Session name. | |
| noRecord | No | Do not record this action. | |
| platform | No | Device platform. | |
| forceFull | No | ||
| timeoutMs | No | Maximum wall-clock time for the snapshot command. | |
| observeOnly | No | iOS only. Refuse instead of activating or repairing the session app. Reports XCUIApplication state, which does not prove screen ownership (#2696). | |
| deviceTarget | No | Device form factor. | |
| customActions | No | List the custom actions an element merged away, such as a card's reply control. Not invocable: reach the control via its detail screen, a labeled element elsewhere, or its rect. iOS simulator only; costs one accessibility round trip per merged element. | |
| interactiveOnly | No |