native-view-at-point
Inspect the deepest UIView at a raw screen point to find custom-drawn or unlabeled elements, or use hitTest to reveal which view would receive a touch when taps land unexpectedly.
Instructions
Inspect the deepest UIView at a raw native window point: the one drawn there, or with hitTest: true the one that would receive a touch.
Without hitTest it ignores userInteractionEnabled and answers "what is visually here?". Use when a screenshot shows something the accessibility tree does not name (an unlabeled icon, a decorative overlay, a custom-drawn cell) and you need the class, identifier or nativeID of whatever draws it.
With hitTest: true it answers "what would receive the touch?". Use when a tap lands somewhere unexpected or does nothing, to see which control UIKit would hand the touch to: a transparent overlay swallowing it, a parent recognizer, a disabled button.
Returns { status: "ok", view }: the matched view with its class name, frames, identifier, label and layer name, plus its ancestors and subviews as requested. view is null when nothing is drawn at that point, or with hitTest when no touchable view sits under it.
To get x and y from a normalized describe frame, multiply its values by the screen size in points, on the same axes (landscape when the UI is). native-full-hierarchy returns that size as screen (pass maxDepth: 1 and fields: ["className"] to keep it small).
If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help. Restart the tool-server (argent server stop && argent server start --detach) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting. Do not restart it, wait a few seconds and retry. If status is init_failed: follow the message (re-boot the simulator) rather than retrying.
An Apple system app is rejected outright (terminal: never retry it).
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": {
"udid": "<udid>",
"bundleId": "<bundleId>",
"x": "<x>",
"y": "<y>"
},
"name": "native-view-at-point"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Raw X coordinate in points, on the axes of the UI as the user sees it (the axes of screenshots and describe frames). NOT normalized [0,1] tap space. | |
| y | Yes | Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. | |
| udid | Yes | Simulator UDID | |
| fields | No | View fields to include. Defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID. Additional: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder | |
| hitTest | No | true returns the view that would receive a touch at the point: it respects userInteractionEnabled, close to UIKit hit-testing. Default false: the deepest visible view. | |
| bundleId | Yes | Bundle ID of the app | |
| maxDepth | No | Maximum depth for returned child/ancestor serialization (default 150). Must be greater than 0. | |
| skipClasses | No | Exact UIView class names whose entire subtree should be pruned | |
| includeChildren | No | Include child views for the matched view (default false) | |
| includeAncestors | No | Include ancestor chain for the matched view (default true) | |
| skipClassPrefixes | No | Class name prefixes to prune entire subtrees |