Skip to main content
Glama

rn_component_tree

List React Native components on screen, keyed by testID, to identify the component that owns an element. Use this to locate the component before inspecting its styles.

Instructions

React components on screen, keyed by testID. Start here to find which component owns an element, then call rn_styles. Requires a dev build with Metro running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax rows. Defaults to 50. Pass 0 for all.
bundleIdNoFilter Metro targets by bundle id, e.g. com.example.myapp.
includePathNoInclude the ancestor chain per row. Verbose, off by default.
onlyTestIdsNoOnly components carrying a testID. Defaults to true.
Behavior3/5

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

With no annotations provided, the description carries the burden. It discloses an important prerequisite (dev build with Metro) and implies a read-style operation, but does not mention output format, default filtering behavior (onlyTestIds defaults to true), or potential performance impacts. It adds some context beyond the bare name but lacks richer behavioral detail.

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?

Three short sentences, each earning their place: purpose, usage workflow, and prerequisite. Front-loaded with the core function, no fluff or redundancy.

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?

The tool has 4 optional parameters and no output schema or annotations. The description covers purpose and prerequisite but does not describe the response shape or default behavior (e.g., that it returns rows keyed by testID, or that includePath adds ancestor chains). It is minimally viable but lacks some contextual detail an agent might need.

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 description coverage is 100%, so baseline is 3. The description does not add much parameter-level information; it only hints at the testID focus ('keyed by testID') which loosely relates to onlyTestIds. The schema already covers each parameter, so the description doesn't need to compensate.

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 states a specific verb and resource: it returns React components on screen keyed by testID. It also clarifies the primary use case ('Start here to find which component owns an element'), distinguishing it from sibling tools like rn_styles and rn_eval.

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?

It gives explicit usage context: 'Start here to find which component owns an element, then call rn_styles.' This establishes a clear workflow and names a follow-up tool. It also notes a prerequisite ('Requires a dev build with Metro running'). It doesn't explicitly list when-not-to-use or alternative tools, but the directional guidance is strong.

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/atz-dsampath/rn-sim-mcp'

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