get_index_stats
Obtain detailed metrics on code index health, including file counts, symbol distributions, embedding model, and database size. Use to debug search quality or monitor index freshness.
Instructions
USE THIS TOOL to get comprehensive statistics about the code index.
This tool provides detailed metrics about the index health, including file counts, symbol distributions, embedding model info, and database size.
TRIGGER - Call this tool when:
You want to understand what's in the index
Debugging search quality issues
Checking index freshness or coverage
Monitoring database size and health
Do NOT use this tool for:
Checking if indexing is needed (use check_index_status)
Searching for code (use search_code)
Args: directory: Path to the project directory.
Returns: Dictionary with: - indexed: boolean - true if anything has been indexed - counts: Symbol, file, chunk, and embedding counts - distributions: Symbol kinds and file extensions - freshness: Last indexed timestamps - embedding: Model name and dimension - database: Size, journal mode, and WAL status
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directory | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |