Skip to main content
Glama

reindex_documents

Synchronize the knowledge base index with files on disk after manual edits or model changes. Choose force for incremental sync or full rebuild for index corruption.

Instructions

Index or reindex all documents in the knowledge base.

Runs in background — returns immediately. Use get_reindex_status() to monitor progress.

Args: force: If True, smart reindex (detects changed files + rebuilds BM25 index). 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 operation status. Poll get_reindex_status() for reindex.active, reindex.progress, and reindex.percent until reindex.active becomes false.

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
Behavior4/5

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

Describes that tool runs in background and returns immediately. Explains that force does smart reindex, full_rebuild deletes all vectors. Missing details on error handling or auth needs, but disclosures are solid given no annotations.

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?

Well-structured with separate sections for Args, Returns, Usage. Every sentence adds value. Front-loaded with purpose and background. No redundant information.

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?

Given 2 optional boolean params and no output schema, the description explains return format and polling procedure. Adequately covers usage context, including when NOT to use.

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?

Schema has 0% coverage but description fully explains each parameter including their purpose and when to use them. Compensates entirely for lack of 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?

Clearly states it indexes/reindexes all documents. Distinguishes from sibling tools like add_document which auto-index. Specifies the two parameters and their effects.

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 says when to use force=True (after manual file edits) and full_rebuild=True (model upgrade or corruption). Notes that normal workflow does not require this tool, and directs to get_reindex_status for monitoring.

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