Skip to main content
Glama

react-profiler-fiber-tree

Inspect a React app's fiber tree to trace component ancestry or verify React Compiler activity via useMemoCache. Returns nested JSON with component names, durations, and children for profiling and debugging.

Instructions

Inspect the React fiber tree and return a JSON representation of the component hierarchy. Use when tracing ancestry of a library component or checking for useMemoCache hook (confirms React Compiler is active on a component). Returns a nested JSON tree of fiber nodes with name, tag, actualDuration, selfBaseDuration, and children. Fails if the React DevTools hook is not present or no fiber roots have been committed yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoMetro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id.
filterNoRegex string to filter component names
device_idYesDevice logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId).
max_depthNoMaximum tree depth to traverse (default 10)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.25.0
    • removedInput schema / properties / port / default
      Removed value: -8081
    • changedInput schema / properties / port / description
      Previous value: -"Metro server port"New value: +"Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id."
    • addedInput schema / properties / port / maximum
      Added value: +65535
    • addedInput schema / properties / port / minimum
      Added value: +1
    • changedInput schema / properties / port / type
      Previous value: -"number"New value: +"integer"
  2. First observedv0.15.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full transparency burden and discloses meaningful behavior: the exact output shape (nested JSON with name, tag, actualDuration, selfBaseDuration, children) and the failure condition (missing React DevTools hook or no committed roots). It could have noted the implied requirement of an active debugger connection, but the key behavioral risks are covered.

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?

Four tightly scoped sentences: purpose, usage context, return format, and failure mode each in its own sentence. No filler, no repetition, and the most important purpose statement is front-loaded.

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?

The tool has no output schema, so the description fills that gap by enumerating the fiber node fields. It also covers the most likely operational failure (DevTools hook missing / no commits). With a simple four-parameter schema, nothing an agent needs to call it correctly is missing.

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 parameters are already fully documented in the schema. The description adds no semantic detail beyond what each parameter's own description provides, so the baseline of 3 is appropriate.

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?

Identifies a specific verb and resource ('Inspect the React fiber tree') and states the JSON result shape. It names two concrete use cases (tracing ancestry of a library component, checking for the useMemoCache hook / React Compiler), which clearly differentiate it from sibling profiler tools like react-profiler-analyze 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?

Gives explicit conditions for use ('Use when tracing ancestry... or checking for useMemoCache hook'), which is clear contextual guidance. It stops short of a 5 because it doesn't explicitly say when not to use this tool or point to an alternative sibling.

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