codegraph
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ROOT | No | Path to the TypeScript/JavaScript repository to index (mount it into the container). Defaults to the working directory. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| who_callsA | 查询某个符号的全部调用方(静态可确认),附每个调用点的源码位置;无法静态消歧的动态调用点单独列出 |
| impactA | 影响面分析:反向调用闭包(排除测试/生成代码),按风险分数排序,每个节点附完整证据调用链与动态调用点 |
| traceA | 链路追踪:从入口符号到目标符号(如 DB/外部调用)的最短调用链(双向 BFS) |
| calleesA | 查询某个符号静态调用了哪些下游符号(who_calls 的镜像),附调用点位置 |
| dead_codeA | 孤儿函数清单:无静态调用者且非对外 API(TS 非导出 / Python 单下划线私有),删除前需人工确认动态调用 |
| cyclesB | import 循环依赖:文件级强连通分量清单 |
| hotspotsC | 加权 PageRank 计算的核心函数(跨文件调用加权),用于新人上手与重构风险提示 |
| searchC | 符号搜索:精确匹配 + 前缀匹配 |
| archaeologyB | 代码考古:git blame 定位符号/行区间的引入 commit、作者贡献度与 PR 关联 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Most tools target clearly distinct analyses: search, callees, who_calls, dead_code, cycles, archaeology, hotspots, impact, trace. The only real overlap is who_calls vs impact (direct callers vs transitive reverse closure), but the descriptions make the boundary explicit (one-hop with locations vs risk-sorted closure with evidence chains). callees and who_calls are deliberate mirrors and are named accordingly.
All names are lowercase snake_case or single words (dead_code, who_calls, hotspots), so the surface is visually uniform. Minor deviation: 'search' is a verb while the rest are nouns/analysis names, and the set does not follow a verb_noun convention, but internally it is predictable.
Nine tools is well within the ideal 3-15 range and each maps to a distinct code-graph query (search, callers, callees, dead code, cycles, blame, ranking, impact, tracing). Nothing feels padded or redundant.
Covers discovery, bidirectional call navigation, transitive impact, dead code, import cycles, hotspot ranking, and git archaeology — a solid lifecycle for static code-graph analysis. Minor gaps: no forward import/dependency query (only cycle detection), and no dedicated symbol-detail/definition tool, though search plus call-site locations partly compensate.