Index a folder of documents
index_documentsIndex HWP, HWPX, PDF, DOCX, XLSX, PPTX, Markdown, and text files in a folder into a local SQLite search index. Run before searching and after changes to update modified files and remove deleted ones.
Instructions
Index the HWP, HWPX, PDF, DOCX, XLSX, PPTX, Markdown and text files in a folder.
Call this once before search can find anything in the folder, and again whenever its files may have changed: only new or modified files are parsed again, and files deleted from the folder are dropped from the index. It reads the files but never changes them; the index is a local SQLite file. The first run over many files takes a while (parsing, and embedding if the server runs with embeddings). Returns how many files were indexed, updated, unchanged or removed, and which files failed to parse and why.
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": {
"folder": "<folder>"
},
"name": "index_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | Absolute path of the folder to index; ~ is expanded. | |
| recursive | No | Also index subfolders. |