Get one Markdown section
get_sectionRetrieve a single Markdown section by heading title or anchor to read only the needed part of a long document instead of the whole file.
Instructions
Return the text of one section of a Markdown file or text, found by heading title or anchor.
Use this when you only need one part of a long document, like the "Install" section of a README, so you don't have to read the whole file. If two headings have the same title, the first one is returned and "matches" tells you how many there are; use the anchor (from outline_markdown) to pick another.
Do not use it to split the whole document (use chunk_markdown).
Returns {"title", "heading_path", "level", "anchor", "start_line", "end_line", "chars", "matches", "text"}. If nothing matches, the error lists the headings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Full path to a local Markdown or text file (UTF-8, up to 10 MB). Leave empty if you pass text. | |
| text | No | Markdown text to use instead of a file. Leave empty if you pass path. | |
| anchor | No | Anchor to find, like "install" or "install-1" for the second "Install". Wins over heading. | |
| heading | No | Heading title to find, like "Install". Not case sensitive. Leave empty if you pass anchor. | |
| include_subsections | No | If true (default), include the smaller headings under it. |