Skip to content

cdp_component_tree

Get React component tree. Returns components with props, state, testIDs. Use filter to scope to a specific subtree — NEVER request full tree unless necessary (saves tokens). Detects RedBox and warns.

NameTypeRequiredDefaultConstraintsDescription
filterstringNoComponent name or testID to scope query (e.g. “CartBadge”, “product-list”)
depthnumberNo4min: 1, max: 12, integerMax depth (default 4, max 12)
cdp_component_tree()