wait_for_close
Wait for a target window or dialog to close, then return the surviving related root app state if a related selector is given.
Instructions
Wait for a target window/dialog to close. If related_to is provided, return the surviving related/root app state.
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": "wait_for_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | App name, Hyprland class/title, pid, or address:0x... selector. | |
| target | No | Target window selector to wait for close, for example address:0x1234. | |
| timeout | No | Seconds to wait. Defaults to 5; capped at 30. | |
| related_to | No | Root app/window selector to return after the target closes. |