codegraph_build
Scan a project directory to build a queryable knowledge graph from code files using tree-sitter AST. Run once per project; rebuild when code changes. Provides structural answers to reduce token usage.
Instructions
Scan a project directory and build the knowledge graph from code files. Uses tree-sitter AST (with regex fallback) for all code files. Fast, local, no API key needed. Run once per project; rebuild whenever code changes.
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": {
"path": "<path>"
},
"name": "codegraph_build"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to project root | |
| cluster | No | Run community detection after build (default true) |