ui_wait_for_element

Deterministic synchronization — replaces all sleeps. Polls for an element until it reaches state (present|enabled|focused|absent) or times out. A timeout is an EXPLICIT error, never a false success. Returns {satisfied, waited_ms, element_ref?, bounds?}.

SERVERLocal SOURCElocal-mcp
High RISK CLASS
Category Execute
Parameters 80 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/ui-wait-for-element.md

What ui_wait_for_element does on Local

AI agents invoke ui_wait_for_element 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
role string
label string
match string
state string Default present.
poll_ms integer Default 150.
window_id string
timeout_ms integer Default 5000.
app_bundle_id string

Parameters from the server's own tool schema.

Why ui_wait_for_element is rated High

This tool itself is synchronization logic, but in the context of browser automation it enables deterministic sequencing of actions (waiting for an element to be clickable, then clicking it). It is not a read-only query since it returns element_ref and participates in control flow that triggers side effects.

From the tool's definition ui_wait_for_element polls DOM for element state changes and returns element references with bounds, enabling conditional triggering of subsequent actions.

Questions about ui_wait_for_element

What does the ui_wait_for_element tool do? +

Deterministic synchronization — replaces all sleeps. Polls for an element until it reaches state (present|enabled|focused|absent) or times out. A timeout is an EXPLICIT error, never a false success. Returns {satisfied, waited_ms, element_ref?, bounds?}. 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 ui_wait_for_element accept? +

ui_wait_for_element accepts 8 parameters: role, label, match, state, poll_ms, window_id, timeout_ms, app_bundle_id. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on ui_wait_for_element? +

Register the Local MCP server in PolicyLayer and add a rule for ui_wait_for_element: 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 ui_wait_for_element? +

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

Can I rate-limit ui_wait_for_element? +

Yes. Add a rate_limit block to the ui_wait_for_element 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 ui_wait_for_element completely? +

Set action: deny in the PolicyLayer policy for ui_wait_for_element. 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 ui_wait_for_element? +

ui_wait_for_element 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.