Skip to main content
Glama

reindex_documents

Reindex documents in the knowledge base. Use force=True after filesystem edits or full_rebuild=True for model upgrades or corruption.

Instructions

Index or reindex all documents in the knowledge base.

Mutating — modifies the vector index. CPU/IO intensive for full_rebuild (~6 min for 200 docs).

Args: force: If True, smart reindex (detects changed files + rebuilds BM25 index). Fast (~5s for 200 docs). Use after manually editing files on disk outside of add_document(). full_rebuild: If True, nuclear rebuild — deletes all vectors and re-embeds everything from scratch. Use only if the embedding model changed or the index is corrupted.

Returns: JSON string with indexing statistics (docs processed, added, skipped, errors).

Usage: Normal workflow does not require this — add_document(), update_document(), and add_from_url() all auto-index on call. Use force=True only after direct filesystem edits. Use full_rebuild=True only for model upgrades or index corruption. No arguments runs a fast incremental pass.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
full_rebuildNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Describes mutating behavior, CPU/IO intensity with example times, detailed effects of each parameter (smart reindex vs. nuclear rebuild), and return value. No annotations exist, but description fully covers behavioral traits.

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?

Well-structured with headers, but slightly verbose; all sentences are valuable, making it efficient overall.

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?

Covers purpose, usage guidelines, parameter behavior, performance, and return value comprehensively, with no obvious gaps given the tool's simplicity and presence of output schema.

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?

Despite 0% schema coverage, the description fully explains both parameters with concrete meanings, defaults, and usage contexts, adding significant value beyond the 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?

Clearly states 'Index or reindex all documents,' distinguishing it from siblings that auto-index (add_document, update_document, add_from_url) and from purely informational tools like get_index_stats.

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 states that normal workflow does not require this tool due to auto-indexing in other tools, and provides specific use cases for force and full_rebuild parameters.

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