Skip to content
All tools

web_wait_for

Web automation · macOS · Windows

Effect: write (strongest supported action). Status: gated.

Gated means the tool requires an installed app, a connected account, permission, or runtime availability. Check those requirements on the listed platform before using it.

macOS

Purpose

Waits (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.

Required inputs

No required inputs are declared in this platform's schema. Optional selectors and runtime requirements may still apply.

Permissions and confirmation

Explicit confirmation parameter: inspect the schema and tool description before any real call. The documentation example keeps confirm false. Obtain user authorization before performing the action.

Full input schema — macOS
{
  "properties": {
    "condition": {
      "description": "Alternative to selector: \"document.querySelector('...')\" is accepted as-is; any other JS expression runs arbitrary code on the page (same power as web_eval).",
      "type": "string"
    },
    "confirm": {
      "description": "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.",
      "type": "boolean"
    },
    "selector": {
      "description": "CSS selector to wait for (preferred; treated as data, never executed). e.g. .feed",
      "type": "string"
    },
    "session": {
      "description": "Session name (default 'default').",
      "type": "string"
    },
    "timeout_seconds": {
      "description": "Max seconds to wait (default 15).",
      "type": "integer"
    }
  },
  "required": [],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "confirm": false,
  "selector": "h1",
  "session": "demo-browser"
}

Windows

Purpose

Waits (polls, not a fixed sleep) until an element appears (or a page condition holds), or times out. PREFER the `selector` param: a CSS selector waited on as data (e.g. selector "input[name=password]"). `condition` also accepts the documented form "document.querySelector('SEL')" for compatibility, or any other JavaScript to evaluate on the page, which requires confirm=true (without it you get a preview and nothing runs). Returns met:true/false.

Required inputs

No required inputs are declared in this platform's schema. Optional selectors and runtime requirements may still apply.

Permissions and confirmation

Explicit confirmation parameter: inspect the schema and tool description before any real call. The documentation example keeps confirm false. Obtain user authorization before performing the action.

Full input schema — Windows
{
  "properties": {
    "condition": {
      "description": "Alternative to selector: \"document.querySelector('SEL')\" (compat), or any other JavaScript.",
      "type": "string"
    },
    "confirm": {
      "description": "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('SEL') form.",
      "type": "boolean"
    },
    "selector": {
      "description": "CSS selector to wait for (preferred; treated as data, never executed). e.g. .feed, input[name=password]",
      "type": "string"
    },
    "session": {
      "description": "Session name (default 'default').",
      "type": "string"
    },
    "timeout_seconds": {
      "description": "Max seconds to wait (default 15).",
      "type": "integer"
    }
  },
  "required": [],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "confirm": false,
  "selector": "h1",
  "session": "demo-browser"
}