get_active_build
Check the health of the C/C++ index at session start. Returns metadata about the last indexed build configuration, including symbol count, staleness, and reindex status.
Instructions
MANDATORY FIRST CALL for C/C++ projects. Return metadata about the most recently indexed build configuration — check index health before using any other fw-context tools.
Read-only: yes. Call at session start to check if the index exists, how many symbols it contains, and whether it is stale (needs re-index).
stale is True when any of: (1) compile_commands.json changed
since the last index, (2) source files were modified after indexing,
or (3) the index schema is older than the current code expects
(schema_version < current_schema). Cases (1) and (2) are handled
transparently by auto-reindex on query; case (3) requires a full
fw-context index — remind the user.
When modified_files_count > 0, a background fw-context index
subprocess is spawned automatically (non-blocking, at most one at a time).
Queries continue to be served from the existing index while the new one
is being built. reindex_progress contains the last log line from
the reindex subprocess when bg_reindex_running is True.
Returns: dict: {config_hash, project_id, project_root, build_system, compile_commands, indexed_at (ISO timestamp), symbol_count, file_count, reference_count, modified_files_count (int), analyzed_symbols (int), unanalyzed_symbols (int — definition symbols still needing LLM analysis), analysis_model (str or None), bg_reindex_running (bool), reindex_progress (str or None — last log line when reindex is running), schema_version (int — DB schema version), current_schema (int — code expects), stale (bool — any staleness condition)}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_root | No | Project root directory. Auto-detected from CWD if omitted. |