Skip to main content
Glama

reindex_file

Update the code index after editing a source file by re-parsing it with libclang and updating its symbols in the SQLite+FTS5 index, using compiler flags from compile_commands.json.

Instructions

Not read-only — mutates the index. Re-parses a single source file with libclang using the exact compiler flags from compile_commands.json and updates its symbols in the SQLite+FTS5 index. The file must be in compile_commands.json. Use after editing a file to keep the index current without rebuilding; use reset_index to rebuild from scratch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to source file to re-parse. Must be in compile_commands.json.
project_rootNoProject root. Auto-detected if omitted.
Behavior4/5

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

No annotations provided, but description clearly states it's not read-only and mutates the index, describes the re-parsing process with libclang and compiler flags, and the update mechanism. Missing details on failure behavior or return value, but overall good transparency.

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

Conciseness5/5

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

Two sentences, front-loaded with critical mutation note, no redundant words. Every sentence adds value.

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

Completeness4/5

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

Covers purpose, usage, prerequisites, and alternative tool. Missing explicit mention of return value or success/failure indication, but otherwise complete for a single-file re-index operation with many sibling tools.

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%, so baseline is 3. The description reinforces constraints (file must be in compile_commands.json) and mentions auto-detection for project_root, but adds minimal new meaning beyond the schema descriptions.

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 description clearly states the tool re-parses a single source file and updates the index. It distinguishes itself from the sibling tool reset_index by specifying it's for incremental updates, not full rebuild.

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

Usage Guidelines5/5

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

Explicitly tells when to use ('after editing a file to keep the index current without rebuilding') and when not to ('use reset_index to rebuild from scratch'). Also notes prerequisite: file must be in compile_commands.json.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/turbyho/fw-context-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server