code_index
Builds or refreshes a local SQLite index of your project's code and docs, so you can search them with code_search. Incremental by default; pass rebuild to re-chunk and re-embed every file.
Instructions
Build or refresh the local code+docs index for the configured project root, then search it with code_search. Walks the root (skipping .git, node_modules, virtualenvs, caches, binaries, oversize files and the same secret blocklist context_pack uses), splits files into overlapping line windows, and stores them in a per-project SQLite index OUTSIDE the repo. Incremental: unchanged files keep their embeddings. Embeddings are OPT-IN and FAIL-SAFE — hosts come from ASK_FABLE_EMBED_HOSTS (comma-separated, tried in order; unset = the LM Studio host), and when none answers the chunks are stored unembedded and code_search degrades to keyword ranking until a later run backfills. Read-only with respect to the repo; returns file/chunk/embedding counts.
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": "code_index"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rebuild | No | Re-chunk and re-embed every file even when its content hash is unchanged (default false: incremental). |