cgis_ingest
Scan a project directory to extract symbols, resolve links, and build or refresh a portable code knowledge graph in SQLite. Incremental updates keep the graph current without full rescans.
Instructions
Scan a local directory, extract all symbols, resolve links, and build the graph DB.
Use this to initialise or refresh the code knowledge graph for a project.
Node FQNs are normalised relative to the workspace root so the graph is
portable across machines.
``db_path`` must name a database — it has to end in ``.db``, ``.sqlite`` or
``.sqlite3``, live in a directory that already exists, and not point at an
existing file that is not a SQLite database. cgis will not create parent
directories.
By default the ingest is **incremental**: only changed/new files are
re-scanned, and the summary reports both what changed this run and the
whole-graph total. When a change alters what other files resolve against — a
renamed, removed or added symbol, a deleted or new file, a changed base class
or re-export — the incremental run rebuilds the whole graph itself, so edges
in unchanged files never point at symbols that no longer exist. Set
``full_rebuild=True`` to force a re-scan of every file from scratch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db_path | No | Where to write the graph: must end in .db, .sqlite or .sqlite3, in a directory that already exists, and must not be an existing non-SQLite file. A relative path resolves against the server's working directory. | graph.db |
| full_rebuild | No | Re-scan every file from scratch instead of the incremental default. | |
| project_path | Yes | Root directory of the project to scan. A relative path resolves against the MCP server's working directory. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |