Skip to main content
Glama

wpf_find_elements

Search for UI elements across all open WPF windows using filters like type, name, text, and visibility. Returns element details including bounds and state for direct interaction.

Instructions

Query elements across all open windows. Filters combine with AND: type_name (partial match, e.g. 'Button' matches 'System.Windows.Controls.Button'), element_name (x:Name substring), text (visible text content — matches a Button's caption, TextBlock text, Window title, AutomationProperties.Name, ToolTip; case-insensitive substring), property_filter (object of property name → expected value substring, e.g. {"IsEnabled": "True"}), visible_only (exclude collapsed/hidden elements — recommended when looking for something the user can see). PREFER text over dumping the tree: e.g. text='Save' + type_name='Button' finds the Save button directly. Results include text, automationId, isVisible, isEnabled and screenBounds (device pixels) so you can pick the right element without extra calls. Returns up to max_results (default 50).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
type_nameNo
max_resultsNo
root_handleNo
element_nameNo
visible_onlyNo
property_filterNo
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explains filter combination (AND), text matching behavior (case-insensitive substring), property_filter format, visible_only recommendation, and result fields. It does not mention side effects or error handling, but for a read-only query tool, this is sufficient.

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 moderately long but front-loaded with the core purpose. It efficiently packs filter behavior, result fields, and a recommendation. Minor redundancy, but no wasted sentences.

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?

With 7 parameters, no output schema, and no annotations, the description is fairly complete covering filter behavior, result fields, and a recommendation. Missing root_handle parameter and potential error conditions, but overall adequate for the complexity.

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 0%, so description must explain parameters. It covers 6 of 7 parameters (missing root_handle) with useful details like text being visible content, property_filter structure. The missing root_handle is a gap, 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.

Purpose4/5

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

Clearly states the tool queries elements across all open windows, with filtering details. However, it does not explicitly distinguish from the sibling 'wpf_find_elements_deep' or other tree tools, though it offers a usage preference note.

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

Usage Guidelines3/5

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

Provides an example and a preference for using 'text' over dumping the tree, but lacks explicit when-to-use or when-not-to-use guidance relative to alternatives like wpf_find_elements_deep. The guidance is implicit and incomplete.

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