Get one Markdown section
get_sectionExtract one section from a Markdown file or text by heading title or anchor, so you can read just the part you need instead of the whole document.
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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_section"
}
}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. |