Skip to main content
Glama

reindex_documents

Rebuild document indexes for the knowledge base to update search accuracy after content changes or model updates.

Instructions

Index or reindex all documents in the knowledge base.

Args:
    force: If True, smart reindex (detects changes + rebuilds BM25). FAST.
    full_rebuild: If True, nuclear rebuild (deletes everything, re-embeds ALL). Use if model changed.

Returns:
    JSON string with indexing statistics

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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the tool performs indexing/reindexing operations, explains the difference between 'smart reindex' and 'nuclear rebuild' (including that the latter deletes everything), and mentions that it returns 'JSON string with indexing statistics.' It also notes performance implications ('FAST' for force=True). However, it doesn't cover potential side effects like downtime or resource usage during full_rebuild.

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 well-structured and concise. It starts with a clear purpose statement, then lists parameters with detailed explanations, and ends with return information. Every sentence adds value: the first defines the tool, the next two explain parameters with context, and the last specifies the return format. There's no redundant or vague language.

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 the tool's complexity (a mutating operation with two parameters that control different rebuild strategies), no annotations, and an output schema present, the description is complete enough. It explains the tool's purpose, parameter semantics, and return format. The output schema handles return value details, so the description doesn't need to elaborate further. It provides all necessary context for an agent to understand and invoke the tool correctly.

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 schema description coverage is 0%, so the description must fully compensate. It does this excellently by explaining both parameters in detail: 'force: If True, smart reindex (detects changes + rebuilds BM25). FAST.' and 'full_rebuild: If True, nuclear rebuild (deletes everything, re-embeds ALL). Use if model changed.' This adds crucial semantic meaning beyond the bare schema, clarifying what each boolean flag does and when to use them.

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?

The description clearly states the tool's purpose: 'Index or reindex all documents in the knowledge base.' It specifies the verb ('index or reindex') and resource ('all documents in the knowledge base'), distinguishing it from siblings like add_document or update_document which handle individual documents. However, it doesn't explicitly differentiate from get_index_stats, which provides statistics rather than performing indexing.

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?

The description provides clear guidance on when to use different parameter combinations: 'smart reindex (detects changes + rebuilds BM25)' for force=True and 'nuclear rebuild (deletes everything, re-embeds ALL)' for full_rebuild=True. It also mentions 'Use if model changed' for full_rebuild. However, it doesn't explicitly state when to use this tool versus alternatives like update_document for individual changes or list_documents for viewing documents.

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