agentleFS
trsdntrsdn/mcp-server-uiautomation/skills/uia-mcp/SKILL.md

uia-mcp

Skill4 starsChanged 9 months agoMITView on GitHub

Inspect and drive live Windows desktop UI through the UIAutomationMcp MCP server - probe the desktop, resolve elements by name, class, automation id, handle or screen point, walk the automation tree, read text, selection and tables, invoke control patterns, and wait for automation events. Windows only.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the UIAutomationMcp MCP server to see and drive real Windows desktop UI.

    line 6
  2. Distinctive:

    Every tool returns JSON.

    line 7
  3. Very specific:

    Prefer uia_table over walking cells with uia_descendants, and prefer a narrow locator over fetching a large result set and filtering.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Use the UIAutomationMcp MCP server to see and drive real Windows desktop UI. Every tool returns JSON.

Tools

ToolPurpose
uia_desktopProbe the desktop root; confirms UI Automation is reachable
uia_snapshotDesktop root plus focused element in one call
uia_focusedThe element with keyboard focus
uia_handleElement owning a native window handle
uia_pointElement at a screen point
uia_find_name / uia_find_class / uia_find_automation_idSingle-criterion shortcuts
uia_inspectFull metadata for one element, using the generic locator
uia_findMultiple matches, with scope and result cap
uia_children / uia_descendantsEnumerate from raw, control, or content view
uia_navigateParent, first/last child, sibling, normalize
uia_textDocument text, selection, caret, annotations, IME state, TextChild
uia_selectionSelection container state
uia_tableRead a Grid/Table control as a cell matrix with headers
uia_actionInvoke, focus, toggle, expand, scroll, move, resize, and more
uia_wait_eventOne-shot wait for a UI Automation event

The locator model

Most tools share the same parameters: root, focused, fromFocused, handle, x/y, name, className, automationId, frameworkId, controlType, processId, scope, plus the negative forms notName, notClassName, notAutomationId, notControlType. They AND-compose.

Prefer uia_table over walking cells with uia_descendants, and prefer a narrow locator over fetching a large result set and filtering.

uia_inspect accepts tryInspect: true to return null instead of failing when nothing matches — use it to assert that something is gone, such as a dialog that should have closed.

Two behaviours that surprise people

Virtualized items. A virtualizing container only materializes what it is showing, so a 300-file folder may expose a dozen live elements. uia_inspect, uia_find and uia_action automatically fall back to asking ItemContainer providers and realizing the result, so a plain locator usually just works. Pass realizeVirtualized: false when you specifically want to prove absence.

MSAA-bridged windows. Win32 controls, MFC dialogs and most installers never got a native UI Automation provider, so they look near-empty: generic control types, missing names, no usable actions. The data is on the other side of the bridge. Check legacyAccessiblePattern, and drive them with uia_action default-action when they support no modern actionable pattern.

Reading the output

  • supportedPatterns lists what a provider advertises; the *Pattern blocks carry the state actually readable.
  • nameSource says where name came from: uia, legacy (MSAA bridge), or labeledBy. Unnamed Win32 inputs are usually identifiable only through their label.
  • fullDescription is where WinUI, UWP and Edge often put the meaningful text when name is terse.

Events

uia_wait_event takes eventKind: focus, automation, property, structure, text-edit, or notification.

notification carries provider announcements ("File saved", "3 results found") in displayString, and is often the only signal that an operation completed. Drag and drop are automation events: 20026 start, 20027 cancel, 20028 complete, 20029 drag enter, 20030 drag leave, 20031 dropped.

Windows only. Requires an interactive desktop session.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.