index
Manage code index lifecycle with actions to check health, build full index, sync changes, and query AST cache.
Instructions
Code-intelligence (codegraph-compatible) index lifecycle hub. Covers codegraph_status, codegraph_full_index, codegraph_autoindex, codegraph_incremental_sync, and AST cache query in one tool. Pick a capability via action:
READ-ONLY:
action=status — check codegraph index health without writing (codegraph_status equivalent). Returns node/edge counts, staleness, and error indicators. Params: (none).
action=cache — query the raw AST cache for symbols, types, and references (read-only modes: search, lookup, stats, changes, watch_status). NOTE: this action ALSO exposes mutating cache modes via
mode— index, sync, invalidate, watch_start, watch_stop (andforce=trueto force a reindex). Params: mode (default search/stats), query, file_path, kind, limit, force.
WRITES ON-DISK INDEX:
action=build — full (re)build of the project index. Slow; use when index is absent or corrupt. Params: force.
action=full — force a complete full reindex (codegraph_full_index equivalent). Params: (none).
action=auto — enable/configure background auto-indexing (codegraph_autoindex equivalent). Params: enable, watch.
action=sync — run one incremental sync pass (fast; use after editing files, codegraph_incremental_sync equivalent). Params: paths.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Which capability to invoke. One of: auto, build, cache, full, status, sync | |
| scope | No | Action discriminator (e.g. point|graph). | |
| mode | No | Action sub-mode (e.g. summary|cycles). | |
| file_path | No | Target file path. | |
| symbol | No | Symbol/function name. | |
| function_name | No | Function name (alias of symbol). | |
| query | No | Search query/pattern. | |
| language | No | Language hint (usually auto). | |
| limit | No | Max results. | |
| output_format | No | Output format (toon|json). |