Web Wait For
web_wait_forWaits (polls, not a fixed sleep) until an element appears on the page, or times out. Use for SPA pages that hydrate after load. Prefer selector (a CSS selector, e.g. "input[name=password]"). condition also accepts the form "document.querySelector('...')"; any OTHER JavaScript condition runs arbitrary code on the page (same power as web_eval): it requires confirm=true, and without it you get a preview that runs nothing. It is disabled when LMCP is in read-only mode. Returns met:true/false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Must be true to run a `condition` that is arbitrary JavaScript. Without it, returns a preview and runs nothing. Not needed for `selector` or the document.querySelector('...') form. | |
| session | No | Session name (default 'default'). | |
| remember | No | With confirm: true, also stop asking for this kind of action from now on. Only when the person said so ("don't ask again"). The person can revoke it in LMCP or with set_always_allowed. | |
| selector | No | CSS selector to wait for (preferred; treated as data, never executed). e.g. .feed | |
| condition | No | Alternative to selector: "document.querySelector('...')" is accepted as-is; any other JS expression runs arbitrary code on the page (same power as web_eval). | |
| timeout_seconds | No | Max seconds to wait (default 15). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| met | No | True if the condition became truthy before the timeout. | |
| message | No | Present when the condition was not met. |