Skip to main content
Glama

reindex

Re-walk, re-parse, and index project files into the database, detecting changed files by content hash so only updates are processed after git pulls, branch switches, or external edits.

Instructions

Re-walk, re-parse, and re-index project files into the database. Detects changed files via content hash and only re-processes what changed. Eagerly populates file and identifier embeddings unless no_embed=true or CONTEXTPRO_REINDEX_NO_EMBED is set. Use after git pull, branch switch, or external edits. Builds the import graph for related/test_map tools.

Input Schema

NameRequiredDescriptionDefault
rootNoAbsolute project root. Required with linked worktrees; subagents must pass their own worktree root on every call.
forceNoForce re-process all files, ignoring cache. Default: false.
no_embedNoSkip corpus embedding generation. Search does not generate corpus embeddings; it uses existing vectors or lexical fallback. Configure an embedding provider and run reindex with no_embed:false to populate vectors (also unset CONTEXTPRO_REINDEX_NO_EMBED). Default: false.
auto_hubsNoGenerate feature-hub labels (one chat-model call per hub). Off by default to keep reindex fast and free. Or set CONTEXTPRO_AUTO_HUBS=1.
target_pathNoScope reindex to a specific directory (relative to root).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A4/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing incremental behavior via content hash, the embedding side effect and its cost implications, the two env-var overrides, and a downstream dependency (import graph for related/test_map). It does not state what happens to stale entries or what the call returns, which keeps it from a 5.

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

Conciseness4/5

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

Four front-loaded sentences, each carrying distinct information (action, incrementality, embedding side effect, when to call). Slightly dense with env-var asides but no filler.

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?

No output schema exists, but the description covers the mutation semantics, cost model, and triggering conditions adequately for call. It omits what the call reports back (e.g., changed-file counts) and any runtime expectations, which would complete the picture.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3; the description earns a notch above by explaining the no_embed flag's interaction with CONTEXTPRO_REINDEX_NO_EMBED and clarifying the default embedding behavior. The other four parameters add no extra meaning in the description beyond their schema text.

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

Purpose4/5

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

Uses a precise verb sequence (re-walk, re-parse, re-index) against a specific resource (project files into the database), leaving no ambiguity about what the tool does. It does not directly name or contrast with the listed siblings (search, status, grep), so it stops short of full sibling differentiation.

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?

Gives concrete trigger conditions: 'Use after git pull, branch switch, or external edits,' which is exactly the kind of context an agent needs. It lacks an explicit when-not-to-use or a pointer to an alternative tool for lighter-weight checks.

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