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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"markdown": "<markdown>"
},
"name": "markdown_refresh_toc"
}
}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. |