Skip to main content
Glama

Inspect an application UI

hs_ui_inspect
Read-only

Get an application's accessibility tree to locate clickable controls, labels, and menu actions, returning each element's path for targeted automation and further interaction.

Instructions

Read an application's accessibility tree: the buttons, menus, fields, and their labels, with the actions each supports. This is how you find out what is clickable in an app and what it is called. Returns structure and labels only, never the contents of text fields or documents. Each node carries a path you can pass to hs_ui_press.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNoApplication name. Defaults to the frontmost application.
roleNoOnly report elements whose role matches, for example "AXButton" or "button".
depthNoHow deep to descend. Deeper finds more but returns much more.
limitNoMaximum nodes to visit before stopping and reporting truncated.
containsNoOnly report elements whose label contains this text, case-insensitive.
Behavior4/5

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

The description is consistent with the readOnlyHint annotation and adds important behavioral context: it never returns the contents of text fields or documents, and each node carries a path usable with hs_ui_press. This gives the agent a clear safety and boundary expectation beyond what annotations alone provide.

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 three tight sentences: the first establishes the core action, the second states the practical use case, and the third covers boundary and next step. No wasted words, no redundant repetition of the schema.

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

Completeness5/5

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

Given the tool is a read-only inspection utility with a full schema and no output schema, the description adequately explains return shape: structure and labels only, nodes with paths, and nothing from text fields or documents. It gives enough context for an agent to select the tool and understand what it will receive.

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 coverage is 100%, so the existing parameter descriptions already carry the load for app, role, depth, limit, and contains. The tool description adds framing around the tree structure and filtering intent, but it does not itself provide additional parameter-level details, so the baseline score of 3 is appropriate.

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 uses a specific verb ('Read') and resource ('application's accessibility tree'), enumerates the elements it returns, and explains the practical purpose: finding what is clickable. It clearly distinguishes itself from sibling tools because it is about inspecting the UI structure rather than controlling windows, apps, audio, or media.

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 explicitly says this is the way to discover what is clickable in an app and what each element is called, giving clear when-to-use context. It doesn't mention explicit exclusions or alternatives, though no listed sibling is an obvious substitute.

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/vukvukovich/hammerspoon-mcp'

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