generate_toc
Read-onlyIdempotent
Generate a formatted table of contents from Markdown with indented links to each heading. Handles duplicate slugs automatically and supports depth limits from 1-6.
Instructions
Generate a Table of Contents from Markdown headings. Returns a Markdown-formatted TOC with indented links to each heading. Handles duplicate heading slugs. The max_depth parameter controls the deepest heading level to include.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | The Markdown text to generate a TOC from. | |
| max_depth | No | Maximum heading depth to include (1-6, default: 6). |