reindex
Trigger re-indexing of repositories
How to use it
Project documentation lists reindex for the Narsil MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), then check which tools your installed version makes available. Tool availability can depend on configuration and credentials. A server handshake does not verify this tool’s behavior. See the full listing for setup details.
Install Narsil MCP
npx @modelcontextprotocol/inspector ./target/release/narsil-mcp --repos ./path/to/repoOther tools in Narsil MCP (39)
Auto-discover repositories in a directory
Find path between two functions
Find unreachable code blocks
Assignments that are never read
Find all references to a symbol
Find Type-3/4 semantic clones of a function
Find code similar to a snippet (TF-IDF)
Find code similar to a symbol
Cross-file symbol usage with imports
Find structs, classes, functions by type/pattern
Variables used before initialization
Get call graph for repository/function
Find functions called by a function
Find functions that call a function
Statistics about code chunks
Get AST-aware chunks for a file
Get cyclomatic/cognitive complexity
Get CFG showing basic blocks and branches
Variable definitions and uses
Analyze imports and dependents
Embedding index statistics
Extract code around specific lines with context
Get exported symbols from a file/module
Get file contents with optional line range
Find highly connected functions
Show index stats and enabled features
Neural embedding index statistics
Get directory tree with file icons and sizes
Which assignments reach each point
Get symbol source with surrounding context
Combined BM25 + TF-IDF with rank fusion
Infer types for variables in a function without external type checkers
List all indexed repositories with metadata
Semantic search using neural embeddings (finds similar code even with different names)
Search over AST-aware code chunks
Keyword search with relevance ranking
BM25-ranked semantic search
Check if path is a valid repository
Fuzzy search symbols across workspace