Skip to main content
Glama

wpf_wait_for_element

Wait for a WPF element to meet a condition after async work, polling the app to skip retries. Conditions: visible, exists, enabled, hidden.

Instructions

Wait until an element matching the criteria satisfies a condition, polling in the target app so you don't have to sleep-and-retry. Identify the element with type_name, element_name and/or text (same matching as wpf_find_elements). condition: 'visible' (default — element exists and is on screen), 'exists' (in the tree even if not visible), 'enabled' (visible and IsEnabled=true), 'hidden' (no matching visible element — e.g. a spinner disappeared). Returns matched (bool), waited_ms, and matched_handle/element_type when found. Use after a click that triggers async work (dialog opens, spinner clears, button enables) before the next step. timeout_ms default 10000 (max 25000); poll_interval_ms default 250.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
conditionNovisible
type_nameNo
timeout_msNo
root_handleNo
element_nameNo
poll_interval_msNo
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses polling mechanism, condition options, return values (matched bool, waited_ms, matched_handle), and default limits (timeout 10000ms, max 25000ms, poll interval 250ms). Lacks detail on error handling or edge cases like timeout result.

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

Conciseness4/5

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

The description is concise, with about 5 sentences that are front-loaded with purpose. Each sentence adds value, though a slight restructuring could improve clarity. No wasted words.

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

Completeness4/5

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

Given the tool's complexity (polling, multiple conditions, async usage), the description covers usage context, condition semantics, return fields, and defaults. It is nearly complete for typical agent usage, though it could detail the root_handle parameter and timeout behavior.

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 description coverage is 0%, so the description must compensate. It explains the matching parameters (type_name, element_name, text) and condition options, timeout_ms default and max, poll_interval_ms default. It omits explanation for root_handle, but overall adds significant meaning beyond 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: waiting for an element to satisfy a condition via polling. It specifies the verb 'wait' and the resource 'element matching criteria', and distinguishes it from sibling tools like wpf_find_elements by emphasizing the polling behavior.

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

Usage Guidelines4/5

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

The description provides explicit when-to-use guidance: 'Use after a click that triggers async work (dialog opens, spinner clears, button enables) before the next step.' It explains each condition and its typical scenario, but does not explicitly state when not to use it.

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/faze79/WPFVisualTreeMcp'

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