Skip to main content
Glama

native-find-views

Locate specific UIViews in a running app using class, identifier, label, tag, or nativeID. Get matching frames and properties without dumping the full 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, 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. Dates show when Glama detected each change.

  1. 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 burden and does so thoroughly. It explains return shape, each possible status with specific recovery actions, the fact that not-connected/running apps surface as statuses rather than failures, and failure cases such as Apple system app rejection and hierarchy query errors/timeouts.

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 front-loaded: purpose, when-to-use, return shape, constraint, then operational statuses. It is long due to complex runtime behaviors, but every sentence adds necessary guidance; the troubleshooting block is justified because there is no output schema or annotations to cover it.

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's complexity, 10 parameters, and no output schema, the description is remarkably complete. It specifies the return format, optional ancestors/children, required search criteria, status-specific recovery flows, and terminal failure cases, so an agent has enough context to invoke and recover from failures.

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?

The input schema already documents all parameters with 100% coverage, so the description does not need to repeat them. It adds meaningful cross-parameter semantics by stating that at least one of className, identifier, label, tag, or nativeID is required, which is not encoded in the schema itself.

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 and resource: 'Search for specific UIViews in the running app' and enumerates all search criteria (class name, accessibility identifier, label, tag, or nativeID). It differentiates from the closest sibling by stating 'Much more targeted than native-full-hierarchy.'

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 explicitly says when to use the tool: 'Use when you need to locate a specific view by its properties without dumping the entire hierarchy.' It also names the alternative native-full-hierarchy and emphasizes the at-least-one search-criterion requirement.

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

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