wait_for
Long-poll until a process, file, or window condition is met, replacing polling loops. Supports process start/end, file existence/stable, window title; max 50 seconds per wait.
Instructions
Long-poll until a condition is met (or timeout). Replaces polling loops. Conditions: process_ended, process_started, file_stable (render/download done), file_exists, window_title_contains. Max 50s per call; if satisfied=false, call again to keep waiting.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Max wait seconds (default 50, max 50) | |
| stable_for | No | For file_stable: seconds unchanged (default 10) | |
| file_exists | No | File path that must appear | |
| file_stable | No | File path that must stop growing | |
| process_ended | No | Process name fragment that must exit | |
| process_started | No | Process name fragment that must start | |
| window_title_contains | No | Window title fragment that must appear |