Skip to main content
Glama

native-find-views

Find specific UIViews in a running iOS app by class name, accessibility identifier, label, tag, or nativeID. Returns matching views with frames and properties, more targeted than full hierarchy dump.

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. Fails if native devtools are not connected, the app is not running, or status is restart_required (call restart-app then retry).

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, 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)
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It explains that the tool returns { status: 'ok', matches } with details including frames, properties, optional ancestors, and optional children. It also discloses failure modes (devtools not connected, app not running, restart required). There is no mention of destructive behavior, which is appropriate for a search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two paragraphs covering purpose, usage, return format, comparison to sibling, required input, and failure conditions. It is well-structured and front-loaded with the most important information. No extraneous details, but could potentially be slightly more compact.

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?

Given the 10-parameter input schema with no output schema, the description provides adequate completeness: purpose, when to use, what to provide, return structure, and failure handling. It lacks exhaustive detail about the return format, but the essence is covered. The tools' complexity is moderate, and the description sufficiently complements the schema.

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 description coverage is 100%, so parameters are documented. The description adds value by stating the requirement that at least one search criterion must be provided (not enforced by schema), and mentions that fields parameter has defaults and additional options. This goes beyond the schema descriptions, warranting a score above the baseline of 3.

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 verb 'Search for' and the resource 'specific UIViews' along with the search criteria (class name, accessibility identifier, label, tag, nativeID). It distinguishes itself from the sibling tool 'native-full-hierarchy' by saying it is 'much more targeted', providing clear differentiation.

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?

The description explicitly states 'Use when you need to locate a specific view by its properties without dumping the entire hierarchy', gives a required condition ('At least one of className, identifier, label, tag, or nativeID must be provided'), and lists failure conditions with remediation (call restart-app then retry). It also contrasts with the sibling tool.

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/software-mansion/argent'

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