index_document
Index a local document (PDF, Markdown, code, etc.) into a searchable knowledge base by splitting into chunks, embedding, and storing vectors. Re-indexing replaces old chunks automatically.
Instructions
Index a document into the knowledge base so it can be searched.
Reads the file at file_path, splits it into overlapping chunks,
embeds each chunk using nomic-embed-text via Ollama, and stores the
vectors in ChromaDB. Re-indexing the same file is safe — old chunks
are replaced automatically.
Args: file_path: Absolute path to the file to index. Supported types: .pdf .md .txt .py .js .ts .json .yaml .yml
Returns: A summary string describing what was indexed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |