Skip to main content
Glama
verisoft-ai

windows2-mcp

by verisoft-ai

wait_for_element

Read-only

Wait for a UI element to appear within a configurable timeout, then return its element ID. Useful after dialog opens, page transitions, or loading spinners disappear.

Instructions

Wait for a UI element to appear within a configurable timeout, then return its element ID. Useful after dialog opens, page transitions, or loading spinners disappear. Preferred strategy order for reliable automation: 1) "accessibility id" (AutomationId) — most stable, use whenever available 2) "name" — good for static labels not subject to localization 3) "xpath" — flexible fallback, e.g. //Button[@Name="OK"] 4) other strategies — use only when the above are unavailable. After interacting with an element you plan to use in generated test code, call get_element_info to capture the best locator.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesThe selector value for the chosen strategy
strategyYesLocator strategy. "accessibility id": Maps to UIA AutomationId — most stable selector, preferred for test automation. Use when the element has a non-empty AutomationId. | "name": Maps to UIA Name property (visible label/title). Reliable when text is static and not locale-dependent. | "id": Alias for accessibility id — maps to UIA AutomationId. | "xpath": Evaluates XPath against the live UIA tree. Use as fallback when no stable AutomationId or Name exists. Example: //Button[@Name="OK"] | "class name": Maps to UIA ClassName — rarely unique on its own; use to narrow results when combined with other strategies. | "tag name": Maps to UIA ControlType (e.g. "Button", "Edit", "TextBlock"). Rarely unique; useful for finding all elements of a type. | "-windows uiautomation": Raw UIA condition expression for advanced compound queries.
timeoutMsNoMaximum time in milliseconds to wait for the element
pollIntervalMsNoHow often to retry in milliseconds
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description declares it waits for an element and returns an element ID, consistent with readOnlyHint annotation. It does not contradict annotations. It adds value by describing the configurable timeout and poll interval, and the retry behavior is implied. Could be improved by explicitly stating what happens on timeout (e.g., throws exception), but it is already adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise—two short paragraphs and a numbered list. Every sentence serves a purpose: capturing the core action, outlining typical use cases, defining strategy preferences, and suggesting a follow-up call. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (waiting for a UI element with configurable timeout and multiple strategies) and the presence of annotations and full schema coverage, the description is complete. It explains what the tool does, when to use it, what strategies to prefer, and how to proceed after use. No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so each parameter is already well-documented. The description goes beyond by providing a preferred strategy order and the context for each strategy (e.g., 'accessibility id' is most stable). This adds practical guidance not present in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Wait for a UI element to appear within a configurable timeout, then return its element ID.' It also provides specific use cases (dialog opens, page transitions, loading spinners), distinguishing it from sibling tools like find_element or click_element.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes explicit guidance on when to use the tool and how to select a strategy: 'Preferred strategy order for reliable automation' with a numbered list. It also advises calling get_element_info after interacting with the element, which helps the agent decide follow-up actions. This clearly differentiates from siblings and provides decision rules.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/verisoft-ai/windows2-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server