click_element
Click UI elements in Windows applications using accessibility identifiers instead of screen coordinates. Works with buttons, menu items, and links by name or automationId, with optional safety checks before execution.
Instructions
Invoke a UI element by name or automationId via UIA InvokePattern — no screen coordinates needed. Prefer over mouse_click for buttons, menu items, and links in native Windows apps. Use get_ui_elements first to discover automationIds. Pass lensId (from perception_register) to run safety guards (identity stable, foreground, modal) before invoking and receive post.perception state feedback without a screenshot. Caveats: Requires the element to expose InvokePattern — some read-only or custom controls do not; fall back to mouse_click in that case.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| windowTitle | Yes | Partial window title of the target window | |
| name | No | Element name/label (partial match, case-insensitive) | |
| automationId | No | Exact AutomationId of the element | |
| controlType | No | Control type filter, e.g. 'Button', 'MenuItem' | |
| narrate | No | Narration level. rich includes UIA or browser state diff when supported. | minimal |
| lensId | No | Optional perception lens ID. Guards (safe.keyboardTarget, target.identityStable) are evaluated before clicking, and a perception envelope is attached to post.perception on success. |