reset_index
Permanently delete a project's symbol index database and WAL files, with a dry-run confirm step first. Use it to clear corrupt or outdated indexes before re-indexing.
Instructions
Delete the entire symbol index for a project.
Not read-only — permanently deletes the SQLite database and WAL files.
Call with confirm=False first (dry-run) to see what would be deleted.
Re-index with fw-context index afterwards.
Handles corrupt databases gracefully — you can delete a corrupt index without needing to open it first.
Args: project_root: Project root directory. Auto-detected if omitted. project: Project name or project_id — call list_projects to get them. Use it to ask about a project that is not the project of the current directory. It is an alternative to project_root, which takes a root path. Give one of the two, not both. confirm: Must be True to execute. Call without first as dry-run.
Returns:
dict: {project_root, db, project_id, action: "dry_run"|"deleted",
message, build_count, symbol_count, indexed_at}. build_count
counts the completed builds of the project, as
get_project_status lists them. symbol_count counts every
symbol row in the database, the rows that the reset deletes: also
the rows of a build that an index run writes now, and of an older
build of a pair that an interrupted run left behind.
indexed_at is the time of the newest build. The three are
present only when a build config is readable.
A ``warning`` key means that the database is corrupt — the
integrity check or a read of the database failed, thus the tool
counts nothing and the three count fields are absent.
On failure the dict holds only ``error`` with the reason.
When another process holds the index of the project, the tool
does nothing and ``error`` names it. A manual ``fw-context index``
run adds ``index_state: "reindexing"``: wait for its end, then call
again. For ``fw-context analyze``: call again after the analysis.
A background index run is no reason: the tool stops it, and the
daemon runs it again after the tool.
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": "reset_index"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Must be True to execute. Call without confirm first as dry-run. | |
| project | No | Project name or project_id — call list_projects to get them. Use it to ask about a project that is not the project of the current directory. It is an alternative to project_root, which takes a root path. Give one of the two, not both. | |
| project_root | No | Project root. Auto-detected if omitted. This field also accepts a project name or a project_id, but project is the clear field for those. |