Skip to main content
Glama

reindex_project

Builds and updates a project symbol index from source code using AST parsing and regex. Run at project start or after code changes to enable accurate code symbol checking and overview.

Instructions

Build or refresh the project symbol index. Extracts all functions, classes, variables, and exports using AST parsing (JS/TS) or regex (Python/Go/Rust). Run this when starting work on a project for the first time, or after significant code changes. The index powers check_symbols and get_project_overview. Fast: ~350 files in under 2 seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_depthNoMax directory depth to scan. Default: 8.
max_filesNoMax files to scan. Default: 2000.
project_pathNoProject root path. If omitted, auto-detects from cwd.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full transparency burden. It discloses the parsing methods (AST for JS/TS, regex for Python/Go/Rust), which is useful, and gives a performance benchmark (~350 files in under 2 seconds). However, it doesn't disclose whether reindexing is destructive (does it clear the old index first?), whether it's safe/reversible, or any state side effects beyond the index itself.

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?

Four sentences with zero waste. Front-loaded with the core action, then scope, then usage guidance, then performance benchmark. Every sentence earns its place.

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?

Good coverage for a tool with no output schema and no annotations. The description covers purpose, method, when to use, dependencies on it, and performance. Minor gap: doesn't mention what the return value/result looks like (which could matter since there's no output schema), but for a side-effect-style reindexing tool this is acceptable.

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 100%, so the schema already documents all three parameters. The description adds value by explaining what project_path does beyond the schema ('If omitted, auto-detects from cwd'), which enriches the schema's terse description. max_depth and max_files are adequately covered by the schema defaults.

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?

Clear specific verb+resource: 'Build or refresh the project symbol index' with explicit scope (functions, classes, variables, exports). Distinct purpose from siblings like check_symbols and get_project_overview, which are consumers of this index rather than builders.

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?

Explicit when-to-use: 'Run this when starting work on a project for the first time, or after significant code changes.' Also explains it powers check_symbols and get_project_overview, making the dependency chain clear and helping decide between reindexing vs calling consumers.

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