markdown_refresh_toc
Refresh an existing markdown table of contents to align with current headings, regenerating anchors and indentation. If no TOC is found, the content is returned unchanged.
Instructions
Refresh an existing table of contents (TOC) in markdown to match current headings. Detects TOC by pattern (- text), regenerates anchors, and updates indentation. Returns unchanged if no TOC exists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | The markdown content with a TOC to refresh. | |
| maxLevel | No | Maximum heading level to include (1-6). Defaults to 6. | |
| minLevel | No | Minimum heading level to include (1-6). Defaults to auto-detect from document. |