Skip to main content
Glama
verisoft-ai

windows2-mcp

by verisoft-ai

find_element

Read-only

Locate a single UI element in the current app window and return its element ID. Supports prioritized locator strategies (accessibility id, name, XPath) for reliable UI automation.

Instructions

Find a single UI element in the current app window. Returns an element ID string. Returns an error if not found. 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.
Behavior4/5

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

Annotations declare readOnlyHint=true; the description adds behavior like 'Returns an error if not found' and gives a strategy priority list. It does not contradict annotations and provides useful behavioral context beyond the structured annotation alone. A minor gap: no mention of potential side effects (though read-only implies none).

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 a single well-structured paragraph with a numbered list for strategy order. Every sentence serves a purpose: purpose, return value, error behavior, strategy ranking, and post-use advice. No redundancy; front-loaded with core action.

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

Completeness3/5

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

Given no output schema and a moderately complex set of sibling tools (find_elements, find_child_element), the description leaves gaps: it doesn't specify if multiple matches cause an error or return first match; it doesn't contrast with find_child_element; the return value ('element ID string') is vague. The strategy guidance partially compensates, but completeness is adequate but not thorough.

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% with detailed enum descriptions for 'strategy' and a description for 'selector'. The description adds value by recommending an order of strategies and suggesting post-use call to 'get_element_info', which helps the agent use parameters effectively. The added context is meaningful but not essential given the already rich 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?

The description clearly states 'Find a single UI element in the current app window' with a specific verb and resource. It distinguishes from sibling 'find_elements' (plural) but does not explicitly contrast with 'find_child_element' or clarify behavior when multiple elements match (e.g., returns first or error).

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?

The description provides a 'Preferred strategy order for reliable automation' and recommends calling 'get_element_info' after interaction, which guides parameter selection. However, it lacks explicit guidance on when to choose this tool over siblings like 'find_elements' or 'find_child_element', leaving the decision partially implicit.

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