DevLens
v1.0.2Query a precomputed code graph (nodes, edges, summaries) of TS/JS/React/Next.js/Node repos via MCP.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
resolve_context
Start here when you need to LOCATE a symbol or EXPLAIN how something works. One call returns a task-shaped packet: ranked nodes with one-line meanings, call flow in execution order, involved files, code bodies of the top 10 nodes, security flags, and an id map, within a token budget. FLOW edges carry the position inside the caller: -calls[#3]-> (repeats as [#1,#3]), executed-after-return as -calls[defer:X]->, parallel as -calls[conc]->, plus at=file:line for the real call site, so you do not need a second call to establish what runs in what order. NOT the right tool for dependency or impact l…
| Parameter | Type | Description |
|---|---|---|
task * | string | The actual question or task, in plain words |
commitHash | string | Defaults to latest analyzed commit |
focus | array | nodeIds, symbol names or filePaths to center the packet on |
intent | string | Default exploratory |
repoPath | string | Only needed when several repos are analyzed and the working folder is ambiguous |
tokenBudget | number | 500..100000; default scales with repo size. Code bodies ride on top of this budget. |
find_symbols
Cheap symbol lookup by name, path fragment, or concept words (lexical BM25F). Returns ranked nodeIds with path:line refs — no code, no structure. Use it to locate a symbol; use resolve_context when you need meaning, flow, or code.
| Parameter | Type | Description |
|---|---|---|
query * | string | Symbol name, identifier, path fragment, or concept words |
commitHash | string | |
limit | number | 1..25, default 10 |
repoPath | string | |
summaryType | string | Which summaries to weight in ranking, default both |
get_node
Full detail for ONE node: technical/business/security summaries, callers (who uses it), callees in execution order (what it calls, with #n, line and control-flow markers such as await, defer:X, conc, repeat, maybe), and its own call sites. Pass a nodeId from resolve_context/find_symbols, or a symbol name to auto-locate. include=['code'] adds the raw source (first 120 lines; page with codeLines=[start,end]). Prefer this over reading whole files.
| Parameter | Type | Description |
|---|---|---|
node * | string | nodeId, or a symbol/file name to locate first |
codeLines | array | With include:['code'] — absolute 1-based [start, end] file lines. Defaults to the first 120 lines of the node; max 400 per call. Follow the banner's next hint to page. |
commitHash | string | |
edgeTypes | array | Restrict callers/callees to these edge types |
include | array | Default: summaries + callers + callees. Add 'code' for raw source. |
repoPath | string |
blast_radius
Use this for EVERY dependency or impact question: who calls X, who uses X, who imports X, what depends on X, what breaks if X changes, every reference to X, callers/consumers of X. It returns the COMPLETE reachable set as compact file:line refs, not a ranked neighbourhood, which is why it answers these questions when resolve_context cannot. Default direction is UPSTREAM (the dependents that break); direction='downstream' is what X itself depends on. radius controls hops (default 2; hub-fanout auto-caps at 1 unless explicit). Pass from+to commit hashes instead of a target to diff two analyzed c…
| Parameter | Type | Description |
|---|---|---|
commitHash | string | |
diffRadius | number | Blast-radius hops for changed nodes in diff mode. Default 1. |
direction | string | Default upstream (who depends on it). 'both' runs both traversals. |
from | string | Older commit hash — commit-range diff mode |
radius | number | Hops. Default 2, capped at hub fanout; explicit value is uncapped. |
repoPath | string | |
target | string | nodeId, symbol name, or file path (required unless from/to given) |
to | string | Newer commit hash — commit-range diff mode |
repo
Manage analyzed graphs. action='list' shows analyzed repos (one line each); action='analyze' indexes a repo folder (run once per repo, or after large structural changes); action='freshness' compares the graph to the current HEAD; action='health' reports summary coverage and circular-dependency groups. Repo resolved from the working folder when omitted.
| Parameter | Type | Description |
|---|---|---|
action * | string | list | analyze | freshness | health |
isGithubRepo | boolean | For analyze: path is a GitHub URL |
path | string | For analyze: local repo path (or GitHub URL with isGithubRepo=true) |
repoPath | string | For freshness/health: disambiguate the graph |