reindex
Re-walk and re-parse project files into the database, using content hashes to process only changed files. Use after git pull, branch switches, or external edits to refresh embeddings and import graph.
Instructions
Re-walk, re-parse, and re-index project files into the database. Detects changed files via content hash and only re-processes what changed. Eagerly populates file and identifier embeddings unless no_embed=true or CONTEXTPRO_REINDEX_NO_EMBED is set. Use after git pull, branch switch, or external edits. Builds the import graph for related/test_map tools.
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": "reindex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute project root. Omit only where this session started; required elsewhere and on every subagent call. | |
| force | No | Force re-process all files, ignoring cache. Default: false. | |
| no_embed | No | Skip corpus embedding generation. Search does not generate corpus embeddings; it uses existing vectors or lexical fallback. Configure an embedding provider and run reindex with no_embed:false to populate vectors (also unset CONTEXTPRO_REINDEX_NO_EMBED). Default: false. | |
| auto_hubs | No | Generate feature-hub labels (one chat-model call per hub). Off by default to keep reindex fast and free. Or set CONTEXTPRO_AUTO_HUBS=1. | |
| target_path | No | Scope reindex to a specific directory (relative to root). |