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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "index_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| force | No | ||
| async_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||