web_wait_for

Waits (polls, not a fixed sleep) until a JavaScript condition is truthy on the page, or times out. Use for SPA pages that hydrate after load, e.g. condition "document.querySelector('input[name=password]')". Returns met:true/false.

SERVERLocal SOURCElocal-mcp
High RISK CLASS
Category Execute
Parameters 31 required
Recommended Rate-limitedsee the rule below
Registry record Grade F, identity unverified Pull the record →

This record as markdown: /tools/com-local-mcp-local-mcp/web-wait-for.md

What web_wait_for does on Local

AI agents invoke web_wait_for to trigger actions in Local. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

ParameterTypeRequiredDescription
session string Session name (default 'default').
condition string Yes JS expression evaluated on the page; waits until it's truthy. e.g. document.querySelector('.feed')
timeout_seconds integer Max seconds to wait (default 15).

Parameters from the server's own tool schema.

Why web_wait_for is rated High

This tool allows arbitrary JavaScript evaluation against DOM state, which is an Execute action—it runs code whose effects depend on the condition argument. Combined with sibling tools like chrome_evaluate_js and chrome_fill_form, this enables automation workflows that can interact with any web application.

From the tool's definition Tool executes JavaScript evaluation on a page via polling 'until a JavaScript condition is truthy'. The tool runs arbitrary JavaScript conditions specified in arguments (e.g., 'document.querySelector(...)'), which constitutes code execution in a browser…

Questions about web_wait_for

What does the web_wait_for tool do? +

Waits (polls, not a fixed sleep) until a JavaScript condition is truthy on the page, or times out. Use for SPA pages that hydrate after load, e.g. condition "document.querySelector('input[name=password]')". Returns met:true/false. It is categorised as a Execute tool in the Local MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

What parameters does web_wait_for accept? +

web_wait_for accepts 3 parameters: session, condition, timeout_seconds. Required: condition. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on web_wait_for? +

Register the Local MCP server in PolicyLayer and add a rule for web_wait_for: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Local. Nothing to install.

What risk level is web_wait_for? +

web_wait_for is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit web_wait_for? +

Yes. Add a rate_limit block to the web_wait_for rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block web_wait_for completely? +

Set action: deny in the PolicyLayer policy for web_wait_for. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides web_wait_for? +

web_wait_for is provided by the Local MCP server (local-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

More on Local, and thousands of servers like it.

// THE MCP REGISTRY

PolicyLayer tracks 44,603 MCP servers and 515,000+ tools.

Every server has a live record: who publishes it, whether it answers without auth, its risk grade, every tool classified, the recommended policy. This page is one line of Local's. Pull the full record:

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.