Skip to main content
Glama

native-find-views

Locate specific UIViews in a running iOS app by class name, identifier, label, tag, or nativeID, returning frames and properties without dumping the entire hierarchy.

Instructions

Search for specific UIViews in the running app by class name, accessibility identifier, label, tag, or React Native nativeID. Use when you need to locate a specific view by its properties without dumping the entire hierarchy. Returns { status: "ok", matches } with matching views including their frames, properties, optional ancestors, and optional children. Much more targeted than native-full-hierarchy. At least one of className, identifier, label, tag, or nativeID must be provided. If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help — restart the tool-server (argent server stop && argent server start --detach) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting — do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised — follow the message (re-boot the simulator) rather than retrying this tool. A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal — never retry it), and the hierarchy query itself can error or time out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoUIView tag integer to match
udidYesSimulator UDID
labelNoAccessibility label to match (exact)
fieldsNoView fields to include. Defaults: className, frame, hidden, alpha, identifier, label, nativeID, userInteractionEnabled, depth. Additional: pointer, tag, windowFrame, screenFrame, bounds, center, opaque, clipsToBounds, transform, contentMode, backgroundColor, tintColor, layerName
bundleIdYesBundle ID of the app
nativeIDNoReact Native nativeID prop to match (exact)
classNameNoUIView class name to match (exact, e.g. UIButton)
identifierNoAccessibility identifier to match (exact)
includeChildrenNoInclude child views for each matched view (default true)
includeAncestorsNoInclude ancestor chain for each matched view (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.26.0
    • changedInput schema / properties / fields / description
      Previous value: -"View fields to include. Defaults: className, frame, hidden, alpha, identifier, label, nativeID, userInteractionEnabled, depth. Additional: pointer, tag, windowFrame, bounds, center, opaque, clipsToBounds, transform, contentMode, backgroundColor, tintColor, layerName"New value: +"View fields to include. Defaults: className, frame, hidden, alpha, identifier, label, nativeID, userInteractionEnabled, depth. Additional: pointer, tag, windowFrame, screenFrame, bounds, center, opaque, clipsToBounds, transform, contentMode, backgroundColor, tintColor, layerName"
  2. First observedv0.15.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden — and it excels. It discloses the return shape ({ status: "ok", matches }), enumerates four distinct status codes with the correct recovery action for each, distinguishes not-connected apps from hard failures, flags the Apple system app as terminal, and warns that the hierarchy query itself can error or time out. This goes far beyond what annotations would typically 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 long but every sentence earns its place: purpose, use-case, return format, match-constraint, then a compactly organized recovery matrix. The front-loaded purpose sentence gives the agent the decision-relevant facts immediately, and the status handling is grouped by status name in a predictable pattern rather than prose.

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?

For a 10-parameter tool with no annotations and no output schema, this description is remarkably complete: it covers purpose, return shape, recoverable vs terminal failure modes, the exact criteria constraint, and the sibling differentiation. The only minor omission — how multiple criteria combine (AND vs OR) — is negligible against the breadth and depth of what is disclosed.

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%, so the baseline is 3, but the description adds a materially useful constraint not enforced by the schema: 'At least one of className, identifier, label, tag, or nativeID must be provided.' Since the schema only requires udid and bundleId, this rule prevents a pointless call that would otherwise match nothing meaningful. The mention of 'optional ancestors, and optional children' also reinforces the includeAncestors/includeChildren parameters.

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 opens with a specific verb-resource-criteria combination: 'Search for specific UIViews in the running app by class name, accessibility identifier, label, tag, or React Native nativeID.' It explicitly differentiates itself from the sibling native-full-hierarchy ('Much more targeted than native-full-hierarchy'), so an agent can distinguish them without opening either schema.

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

Usage Guidelines5/5

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

It states the precise when-to-use condition ('when you need to locate a specific view by its properties without dumping the entire hierarchy') and names the alternative it contrasts with. The extensive status-handling block also functions as operational usage guidance: retry for connect_pending, restart the tool-server for service_stale, never retry for Apple system apps — an unusually explicit decision procedure.

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