Skip to main content
Glama

debugger-inspect-element

Inspect React component hierarchy at a screen coordinate. Get the source file, line number, and code fragment for the tapped element and its parents.

Instructions

Inspect the React component hierarchy at a screen coordinate (x, y). Returns components from the tapped element upward through its parent hierarchy, each with its source file:line and a code fragment.

The first items (lowest indices) are the most specific — the exact component under the tap point and its direct parents. Higher indices are broader context (page, navigator). Default shows 35 items which covers all app-specific code; use maxItems=70+ to also see the navigation/screen structure.

Uses getInspectorDataForViewAtPoint + _debugStack + Metro /symbolicate. Set resolveSourceMaps to false to skip symbolication and get raw bundled locations instead. Set includeSkipped=true to see filtered items annotated with skip reasons. Use when you need the source file and line for a component at a tap coordinate. Fails if the app is not connected or the coordinate is outside the screen.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesLogical X coordinate on device screen
yYesLogical Y coordinate on device screen
portNoMetro server port
maxItemsNoMaximum number of hierarchy items to return, counted from the bottom (most specific component first). The hierarchy walks from the tapped element up to the root — the first items are the most relevant for editing. Increase to 70+ if you need to understand the broader navigation/screen structure.
device_idYesDevice id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial).
contextLinesNoLines of source context to include around the component definition
includeSkippedNoWhen true, items that would normally be filtered are kept in the response with skipped=true and a skipReason. Useful for understanding what was pruned.
resolveSourceMapsNoWhen true, resolves bundled frame locations to original source files via Metro symbolication and includes a code fragment. When false, returns the raw bundled frame info (file, line, column) without symbolication or source reading.
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses internal mechanisms ('Uses getInspectorDataForViewAtPoint + _debugStack + Metro /symbolicate') and explains behavior of parameters like maxItems and resolveSourceMaps. It does not explicitly state read-only nature but implies no mutation.

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 moderately concise with multiple paragraphs, but each sentence serves a purpose. Front-loaded with the core function, then details. Could be slightly tighter but not overly verbose.

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?

With no output schema, the description fully explains return value: 'components... each with its source file:line and a code fragment', including hierarchy ordering. It also covers failure conditions, parameter effects, and internal details. Comprehensive for a complex tool.

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 baseline is 3. The description adds significant value beyond schema, explaining the ordering of returned items ('first items are most specific') and the purpose of maxItems (covers app-specific code vs navigation structure). This justifies a 4.

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 'Inspect the React component hierarchy at a screen coordinate (x, y)' with a specific verb and resource. It differentiates from siblings by focusing on React component inspection via coordinates, unlike tools like native-view-at-point or debugger-component-tree.

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?

The description includes 'Use when you need the source file and line for a component at a tap coordinate' and 'Fails if the app is not connected or the coordinate is outside the screen'. While explicit about when to use and failure conditions, it does not mention specific alternatives or exclusions.

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