Index repository locally
localscope_indexIndex a repository locally to enable offline code analysis: scans files, symbols, and import graph with no network calls, keeping all data on your machine.
Instructions
Build a local, private index of a repository: files, symbols (functions/classes/types), import graph, and optional embeddings. Zero network calls — the index never leaves the machine.
Args:
path (string): repository root, default "."
max_files (number): safety cap, default 50000
response_format ('markdown' | 'json'): default 'markdown'
Returns: File/chunk/symbol counts, embedder mode (onnx or lexical), duration.
Use when: the user asks to index/analyze the codebase, or before localscope_search / localscope_impact on a repo not indexed yet in this session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Repository path to index (absolute, or relative to the directory the server was started in) | . |
| max_files | No | Safety cap on number of files to index | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for machine-readable | markdown |