Skip to main content
Glama
nongtiensonpro

Document RAG MCP

index_document

Convert and index a document for search and retrieval. Supports PDF, DOCX, XLSX, CSV, PPTX, HTML, Markdown, TXT, XML; validates content and skips unchanged files unless forced.

Instructions

Convert and index one document from a configured document root.

path may be relative to RAG_DOCUMENT_ROOT or an absolute path. Supports: PDF, DOCX, XLSX, CSV, PPTX, HTML, Markdown, TXT, XML. Returns validation results and diff info (skipped if unchanged). Set force=True to force re-indexing even if content hash is unchanged. Set async_index=True to run in background and return job_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
forceNo
async_indexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden, and it does well: it discloses that content hash is checked, that unchanged documents are skipped, that force overrides this, and that async_index shifts to background and returns a job_id. It aids the agent in predicting side effects and return behavior beyond the input schema. It stops short of a 5 because it doesn't mention error/validation-response specifics or permission prerequisites, though the output schema likely covers return structure.

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 compact, front-loaded with the main purpose, and each line adds concrete value: path resolution, supported formats, return behavior, force, and async options. There is no redundant or filler text.

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 a simple 3-parameter tool with an output schema and no nested objects, the description covers all relevant operational concerns: supported file types, path context, hash-change optimization, re-index override, and background execution mode. The agent has enough to select and invoke this 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?

Schema description coverage is 0%, so the description must compensate, and it does: it explains path semantics (relative vs absolute), force behavior (re-index despite unchanged hash), and async_index behavior (background execution, returns job_id). This gives the agent meaningful guidance that the raw schema field names alone would not provide.

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 a specific verb and resource: 'Convert and index one document', which clearly differentiates this from sibling tools like index_directory (one vs. directory) and search_documents (indexing vs searching). The mention of 'one document' plus the supported format list fully establishes its purpose.

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?

It states that the tool handles a single document from a configured root, which implicitly tells the agent to choose index_directory for batch indexing. It also gives explicit guidance on when to use force=True and async_index=True, and describes the relative/absolute path options. It lacks an explicit when-not-to-use statement naming alternatives, which keeps it just shy of 5.

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/nongtiensonpro/document-rag-mcp'

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