get_section_descendants
Traverse a section's descendants in document order with optional max depth, returning only section IDs. Pairs with ancestor retrieval to map documentation hierarchy.
Instructions
v1.43+ — return every descendant of a section (BFS over parent_id) in document order with depth offset. Pairs with get_section_path (ancestors). Optional max_depth caps the walk; max_depth=1 returns immediate children only. Handles only — no content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository identifier | |
| section_id | Yes | Target section. Its descendants are returned; target itself is not included. | |
| max_depth | No | Optional cap on traversal depth. None = full subtree. 1 = immediate children only. |