ui_click_outside
ui_click_outsideClick outside a modal, drawer, or popover panel to close it via its backdrop, targeting a safe point that is not inside the element or a control, and report what was hit.
Instructions
Click just outside the single element matching the selector, the way a user closes a modal, drawer or popover by clicking its backdrop. Picks a point whose topmost element is not inside the target and not a control, and says what it hit. Pass the dialog panel, not the backdrop. Fails if no safe point exists (the element fills the viewport): use ui_press_key with Escape then. Selectors containing "nth=" are positional: call ui_get_page_state again after the page changes before reusing them.
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": {
"selector": "<selector>"
},
"name": "ui_click_outside"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector, or the `selector` value of an element from ui_get_page_state, passed unchanged of the modal/panel to click outside of | |
| session_id | No | Which open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open. |