Skip to main content
Glama

reindex_documents

Reindex all documents in the knowledge base in the background. Use force, resume, or full rebuild flags to control the reindexing process. Returns a JSON envelope for tracking progress.

Instructions

Index or reindex all documents in the knowledge base (runs in background).

force — smart reindex (detect changed files + rebuild BM25). Use after filesystem edits outside add_document/update_document. full_rebuild — nuclear rebuild (delete + re-embed). Use only after embedding-model change or index corruption. Mutually exclusive with resume. resume — pick up an interrupted smart reindex from data/reindex_checkpoint.json. Falls back to a fresh smart run silently if the checkpoint is missing/corrupt/drifted (v4.8.0 Fase 4).

Returns a JSON envelope. Poll get_reindex_status() until reindex.active becomes false. Add/update/URL tools already auto-index — use these flags only for the recovery/rebuild scenarios above.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
resumeNo
full_rebuildNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully bears the transparency burden. It discloses background execution, status polling via get_reindex_status(), silent fallback on checkpoint issues, and destructive deletion in full_rebuild ("nuclear rebuild (delete + re-embed)"). This goes well beyond basic expectations.

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?

The description is efficiently structured: the purpose is front-loaded, each parameter is explained on its own line, and the closing note ties everything together. Every sentence provides necessary context—no filler or redundancy.

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?

The description is complete for a tool with three nuanced flags: it covers purpose, usage scenarios, background behavior, status polling, and the relationship to sibling tools. The output schema exists, but the description additionally clarifies the polling mechanism, making it self-sufficient.

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

Parameters5/5

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

The input schema has no descriptions (0% coverage), but the description fully explains each parameter: force as smart reindex, full_rebuild as destructive rebuild with mutual exclusivity with resume, and resume with checkpoint path and fallback behavior. This adds essential meaning beyond the bare schema.

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 opens with "Index or reindex all documents in the knowledge base (runs in background)", which clearly states the verb, resource, and scope. It distinguishes itself from siblings by explicitly noting that add/update/URL tools already auto-index, so this tool is for recovery/rebuild scenarios.

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 usage guidelines are provided for each flag: "Use after filesystem edits outside add_document/update_document" for force, "Use only after embedding-model change or index corruption" for full_rebuild, and a closing note that add/update/URL tools auto-index, so these flags are only for recovery/rebuild. This clearly states when to use the tool versus alternatives.

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/lyonzin/knowledge-rag'

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