get_related_sections
Find structurally and semantically related sections in documentation to navigate precisely and reduce token usage.
Instructions
v2.0+ related-section graph. Returns structural neighbors (siblings, children, parent, optional cousins) and semantic neighbors (top-N cosine over stored embeddings, score >= min_score). mode: structural | semantic | both.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | both | |
| repo | Yes | ||
| top_n | No | ||
| min_score | No | ||
| section_id | Yes | Target section ID. 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`. | |
| max_per_kind | No |