get_section_context
Retrieve a documentation section with ancestor headings, target content, and child summaries to preserve hierarchy context without reading the whole file.
Instructions
Retrieve a section with its full hierarchy context: ancestor headings (root → parent) for orientation, the target section's content, and immediate child summaries. Prevents 'section too thin' without falling back to whole-file reads.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository identifier (owner/repo or just repo name) | |
| max_tokens | No | Approximate token budget for the target section's content (bytes/4 estimate). Ancestors and child summaries are always included. | |
| section_id | Yes | Target section ID from get_toc, search_sections, etc. v1.147+ — also accepts a `doc.md#anchor` reference to a heading written with an explicit `{#id}`; an ambiguous reference sets `anchor_ambiguous`, `anchor_scope`, `anchor_match_count`, `anchor_candidates` (at most 20), `anchor_candidates_truncated` and `warning`. | |
| include_related | No | v1.20+ adaptive context: append structural + semantic neighbor summaries. | |
| include_children | No | Include immediate child section summaries (no content reads). Default true. | |
| strip_boilerplate | No | v1.24+ — strip repeated cross-section fragments before returning the target section content. |