index_codebase
Build or refresh a local semantic search index for your codebase, enabling fast semantic code search via Ollama. Only changed files are re-embedded, so indexing is incremental.
Instructions
Build or refresh the LOCAL semantic search index for a directory tree.
Incremental: only files whose mtime/hash changed are re-embedded. Stored in the
server's data dir (~/.cache/ollama-agent), not in the repo. Run once per repo; search_code refreshes it
automatically afterwards. include_globs defaults to common source/doc extensions.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"root": "<root>"
},
"name": "index_codebase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | Yes | ||
| force | No | ||
| include_globs | No |