get_section_descendants
Return all descendant sections under a given section (BFS by parent_id) in document order, with an optional depth limit for precise navigation.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo": "<repo>",
"section_id": "<section_id>"
},
"name": "get_section_descendants"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository identifier | |
| max_depth | No | Optional cap on traversal depth. None = full subtree. 1 = immediate children only. | |
| section_id | Yes | Target section. Its descendants are returned; target itself is not included. v1.147+ — also accepts a `doc.md#anchor` reference to a heading written with an explicit `{#id}`; an ambiguous one sets `anchor_ambiguous`, `anchor_scope`, `anchor_match_count`, `anchor_candidates` (at most 20), `anchor_candidates_truncated` and `warning`. |