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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "localscope_index"
}
}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 |