Skip to main content
Glama

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

NameRequiredDescriptionDefault
confirmNoMust be True to execute. Call without confirm first as dry-run.
projectNoProject 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_rootNoProject root. Auto-detected if omitted. This field also accepts a project name or a project_id, but project is the clear field for those.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.30.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / project
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "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.",
      +  "title": "Project"
      +}
    • changedInput schema / properties / project_root / description
      Previous value: -"Project root. Auto-detected if omitted."New value: +"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."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden and does so thoroughly: it declares non-read-only behavior, names exactly what is destroyed (SQLite database and WAL files), requires confirm=True, and explains corruption handling. It also discloses concurrency semantics — behavior when another process holds the index, the index_state="reindexing" case, the analyze case, and that background index runs are stopped and restarted by the daemon.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The destructive warning and dry-run instruction are correctly front-loaded. However, the Returns block is heavily over-written, spending many lines on how build_count/symbol_count double-count interrupted build pairs — detail an agent does not need in order to decide or call, and which buries the practically important 'error' and locking notes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, zero-required-parameter tool with no output schema and no annotations, this is essentially complete: it covers destruction scope, confirmation protocol, post-conditions (re-index required), return shape including the warning and error keys, and all known failure/concurrency modes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and every parameter description in the prose (project vs project_root, confirm semantics) duplicates what the schema already says verbatim. No additional syntax, format, or edge-case meaning is added beyond the structured fields, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb and resource ('Delete the entire symbol index for a project') with unambiguous scope — the whole index, not a file, which cleanly separates it from the sibling reindex_file. The scope qualifier 'entire' prevents confusion with partial/incremental re-indexing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete operational sequencing: call with confirm=False first as a dry-run, then re-index with 'fw-context index'. It also names a use case (deleting a corrupt index that cannot be opened). It stops short of explicitly contrasting itself with the sibling reindex_file, but the destructive-vs-incremental distinction is implicit in 'entire symbol index' and the dry-run workflow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.