Skip to main content
Glama
segentic-lab

codelens-mcp

by segentic-lab

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

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile 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.
markersOnlyNoReturn only comments carrying a TODO/FIXME/FIX/BUG/HACK/NOTE/XXX marker (default false).
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the JSON return shape, truncation at 600 chars, list cap at 500, marker case-sensitivity to avoid false positives, and supported languages. It also warns against relying on signatures alone, adding valuable behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is detailed but every sentence earns its place: it leads with a one-sentence summary, explains output format, limitations, languages, and use cases. The final caution about reading source code is relevant. It is front-loaded and information-dense without being padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool supports array input, returns per-file results with a summary, and has no output schema, so the description must explain return values. It does so thoroughly, covering structure, edge cases (truncation, caps), and usage context. Given the complexity, it is complete enough for an agent to select and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for parameters, so the baseline is 3. The description adds minimal parameter-specific meaning beyond the schema; it mentions 'markersOnly:true' but repeats the schema's semantics. The description's extra context about output and behavior does not significantly enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states what the tool does: it returns all comments in a file with line ranges, kind, and marker detection. It distinguishes itself from siblings like codelens by positioning itself for surveying docs/debt rather than locating code. The specific output format and options further clarify its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided: 'Use for surveying docs/debt without reading whole files.' It contrasts with codelens, which is for locating code, and advises reading the actual source before modifying. This gives clear when-to-use context and differentiates from alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/segentic-lab/codelens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server