Skip to main content
Glama

inspect_component

Analyze React component details including props, styles, and state. Use after identifying components in the tree to examine specific instances with configurable depth for children inspection.

Instructions

Inspect a specific React component by name. DRILL-DOWN TOOL: Use after get_component_tree(structureOnly=true) to inspect specific components. Returns props, style, state (hooks), and optionally children tree. Use childrenDepth to control how deep nested children go.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentNameYesName of the component to inspect (e.g., 'Button', 'HomeScreen', 'FlatList')
indexNoIf multiple instances exist, which one to inspect (0-based index, default: 0)
includeStateNoInclude component state/hooks (default: true)
includeChildrenNoInclude children component tree
childrenDepthNoHow many levels deep to show children (default: 1 = direct children only, 2+ = nested tree)
shortPathNoShow only last 3 path segments (default: true)
simplifyHooksNoSimplify hooks output by hiding effects and reducing depth (default: true)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes what information is returned (props, style, state, children tree) and mentions parameter-controlled behavior (childrenDepth controls nesting depth). However, it doesn't address important behavioral aspects like whether this is a read-only operation, potential performance implications, or error conditions when componentName doesn't exist.

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 perfectly concise and well-structured: three sentences that each earn their place. The first states the core purpose, the second provides crucial workflow guidance, and the third explains key return values and parameter usage. No wasted words, front-loaded with essential information.

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?

For a tool with 7 parameters, no annotations, and no output schema, the description is adequate but has gaps. It explains the purpose and workflow relationship well, but doesn't describe the return format (what does 'Returns props, style, state' actually look like?) or address error conditions. Given the complexity and lack of output schema, more detail about the return structure would be helpful.

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 the schema already fully documents all 7 parameters. The description adds minimal value beyond the schema - it mentions 'childrenDepth to control how deep nested children go' which is already covered in the schema description. No additional parameter semantics are provided beyond what's in the structured fields.

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 tool's purpose: 'Inspect a specific React component by name' with specific details about what it returns (props, style, state, children tree). It distinguishes itself from sibling tools like 'get_component_tree' by being a drill-down tool for specific components rather than a tree overview.

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 provides explicit usage guidance: 'Use after get_component_tree(structureOnly=true) to inspect specific components.' This clearly indicates when to use this tool versus its sibling, establishing a workflow relationship and preventing misuse.

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/igorzheludkov/metro-logs-mcp'

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