Skip to main content
Glama

query_ui

Query a UI by semantic selector (role, name, value, or id) to find matching nodes. Returns stable refs for matches or nearest candidates to guide retries.

Instructions

Find nodes in a UI by a semantic selector (role, name, value, or id). Returns matches with stable refs; on a miss, returns the nearest candidates to guide a retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo
themeNo
selectorYesSelector: `{"role":"button","name":"Add"}` (role/name/value/id).
descriptionYesThe UI description: a `fenestra/1` JSON object.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesYesNodes matching the selector, in tree order.
nearestNoWhen `matches` is empty, up to a few nearest candidates to guide a retry.
Behavior4/5

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

The description discloses two key behaviors not implied by the name: stable references and return of nearest candidates on a miss. This adds transparency beyond the name, though it does not explicitly state read-only nature (no annotations provided).

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?

Two succinct sentences: the first states the core function, the second adds critical error-handling behavior. No wasted words, front-loaded with the 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?

Adequate for a query tool with output schema present, but incomplete regarding parameters size and theme. The description covers the main behavior but misses input details for two of four parameters.

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

Parameters2/5

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

With 50% schema description coverage, the description adds minimal parameter context. Only the 'selector' is explained via an example in the schema; size and theme are undocumented in both schema and description, leaving their purpose unclear.

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 clearly states the tool finds UI nodes using a semantic selector and lists selector fields (role, name, value, or id). It also specifies the outcome: returns matches with stable refs or nearest candidates on a miss, distinguishing it from sibling tools like check_a11y.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus the 12 sibling tools (e.g., check_a11y, interact). No mention of alternatives, prerequisites, or conditions for use.

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/richer-richard/fenestra'

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