comments
Extract code annotations with line ranges and types (line, block, doc) and detect TODO/FIXME markers to survey documentation and technical debt without reading entire files.
Instructions
All comments in a file with 1-based line ranges, kind (line | block | doc — doc covers /** */ and Python docstrings in real docstring position), and marker detection. Returns JSON {path, language, hasErrors, comments[{line, endLine, text, kind, marker}]}. marker is TODO|FIXME|FIX|BUG|HACK|NOTE|XXX when the comment contains that UPPERCASE word (case-sensitive to avoid prose false-positives), else null. Set markersOnly:true to get only marked comments (the debt list). Comment text clips at 600 chars (textTruncated:true); list caps at 500. Languages: TS/TSX/JS/JSX/Python. Use for surveying docs/debt without reading whole files. codelens is a navigation map: use it to LOCATE code, then Read the actual source before judging or modifying it. A signature is not the body.
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 (anything outside is rejected — call info to see the root). Supported: .ts .tsx .mts .cts .js .jsx .mjs .cjs .py. Accepts a single path or an array of up to 20 paths; an array returns {results, summary} with per-file entries. | |
| markersOnly | No | Return only comments carrying a TODO/FIXME/FIX/BUG/HACK/NOTE/XXX marker (default false). |