Index repository
index_repositoryIndex a repository into a knowledge graph for code intelligence. Supports full, fast, and cross-repo-intelligence modes for efficient codebase analysis.
Instructions
Index a repository into the knowledge graph. Special mode 'cross-repo-intelligence': skip extraction, only match Routes/Channels across projects to create CROSS_HTTP_CALLS/CROSS_ASYNC_CALLS/CROSS_CHANNEL edges. Requires target_projects param. Ensure target projects have fresh indexes first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | All modes run type-aware LSP call/usage resolution (per-file + cross-file). full: all files + similarity/semantic edges. moderate: filtered files + similarity/semantic. fast: filtered files, no similarity/semantic. cross-repo-intelligence: match Routes/Channels across projects. | full |
| name | No | Override the derived project name. Non-ASCII bytes are encoded and unsafe path characters are normalized. | |
| repo_path | Yes | Path to the repository | |
| persistence | No | Write compressed artifact to .codebase-memory/graph.db.zst for team sharing. Teammates can bootstrap from the artifact instead of full re-indexing. | |
| target_projects | No | Projects to search for cross-repo links (cross-repo-intelligence mode). Use ["*"] for all indexed projects. Run list_projects to see available projects. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||