outline
Get the full heading hierarchy of a markdown file with line numbers. Locate sections quickly, then read only the relevant section.
Instructions
Full heading hierarchy of one markdown file with 1-based line numbers — its table of contents. Recognizes ATX (#…) and setext (===/---) headings; skips headings inside fenced code blocks and YAML frontmatter; handles CRLF. Returns {path, totalHeadings, truncated, headings:[{depth, text, line}], totalLines}; capped at 500. For source code use overview instead. Pick a section here, then read only it with heading(). lens is a navigation map over code and docs: use it to LOCATE things, then Read the actual source/section before judging or modifying it. A signature is not the body; an outline is not the section.
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": {
"path": "<path>"
},
"name": "outline"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path. Relative paths resolve against the server's working directory; absolute paths are allowed only inside it (outside is rejected — call info to see the root). Code: .ts .tsx .mts .cts .js .jsx .mjs .cjs .py; docs: .md .markdown .mdx |