Index a codebase
index_codebaseParse a TypeScript/JavaScript codebase into call and import graphs using the TypeScript type checker. Run first to enable queries for definitions, callers, callees, and impact analysis.
Instructions
Parse a TypeScript/JavaScript codebase into a call graph and import graph, using the real TypeScript type checker for symbol resolution (not regex matching). Run this first before using any query tool.
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": {
"root_dir": "<root_dir>"
},
"name": "index_codebase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root_dir | Yes | Absolute path to the codebase root to index | |
| graph_path | No | Where to save the resulting graph (default: .codegraph/graph.json) |