Skip to main content
Glama
Karylcode
by Karylcode

ui_tree

Lists open windows and on-screen UI elements with text, type, bounds, and clickable/input flags plus refs for targeting UI actions.

Instructions

List open windows and on-screen UI elements (text, tooltip, actionId, type, rect, clickable/input flags) with refs for the other ui_* tools.

Input Schema

NameRequiredDescriptionDefault
limitNoMax elements (default 150).
queryNoOnly elements whose text/tooltip/actionId/objectName/type contains this.
windowNoWindow index or title substring (default: focused/main window).
include_hiddenNo
interactive_onlyNoOnly clickable, input or action elements.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; 'List' signals a read operation and the enumeration of returned fields tells the agent what to expect. It does not disclose cost/latency of walking a UI tree, whether hidden elements are included by default, or that results are truncated by a default limit. Adequate but leaves real gaps for an unannotated tool.

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?

A single dense sentence with the resource front-loaded and the interoperability note trailing. Every clause carries information; nothing is padded.

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 no output schema, the enumeration of returned fields (text, tooltip, actionId, type, rect, flags) usefully stands in for a return-value spec, and the ref-for-siblings note completes the workflow picture. The only gap is the undocumented include_hidden parameter and the default-limit behavior.

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

Parameters3/5

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

Schema description coverage is 80%, so the schema already documents limit, query, window, and interactive_only; the description adds nothing parameter-specific beyond naming searchable fields in the return list. The undocumented include_hidden parameter is not compensated for in the description either.

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?

States a specific verb (List) and two concrete resources (open windows, on-screen UI elements), then enumerates the element attributes returned. The closing clause 'with refs for the other ui_* tools' distinguishes it from the action-taking siblings like ui_click and ui_invoke, which consume those refs.

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?

'with refs for the other ui_* tools' implicitly positions this as the discovery step before ui_click/ui_hover/ui_type, which is clear workflow context. However, it never explicitly says when to use this versus screenshot or get_scene_info, and gives no exclusions or prerequisites.

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