kdeps-tools-load_document
v1.0.0Load a document file and return its content as text. Supports PDF (go-pdf, pdftotext, pdfcpu), DOCX/EPUB/RTF/ODT (pandoc), HTML (goquery, lynx), CSV, text, directory, notion, markdown (textutil). Use for reading documents into the conversation for analysis or RAG pipelines. Returns document content with optional splitting into chunks. Requires: source (absolute file path). Optional: type (pdf, csv, html, text — auto-detected from extension), chunkSize (split into chunks of N characters).
Install
A kdeps asset: kdeps installs it on first run and updates it without a new release.
Pin a version with kdeps update tools/load_document@<version>.
Contents
Load a document file and return its content as text. Supports PDF (go-pdf, pdftotext, pdfcpu), DOCX/EPUB/RTF/ODT (pandoc), HTML (goquery, lynx), CSV, text, directory, notion, markdown (textutil). Use for reading documents into the conversation for analysis or RAG pipelines. Returns document content with optional splitting into chunks. Requires: source (absolute file path). Optional: type (pdf, csv, html, text — auto-detected from extension), chunkSize (split into chunks of N characters).
| Parameter | Type | Description |
|---|---|---|
| chunkSize | number | Split into chunks of this many characters (for RAG). 0 = no splitting. |
| source * | string | Absolute path to the document file |
| type | string | Document type: pdf, pdf_pdftotext, pdf_cpu, pandoc, docx, epub, rtf, odt, html, html_lynx, csv, text, textutil, directory, notion. Auto-detected from the file extension if omitted. pdf=Go lib, pdf_pdftotext=poppler, pdf_cpu=pdfcpu, pandoc=universal, docx/epub/rtf/odt=pandoc, html_lynx=lynx, textutil=macOS. |
version: 1.0.0
description: 'Load a document file and return its content as text. Supports PDF (go-pdf, pdftotext, pdfcpu), DOCX/EPUB/RTF/ODT (pandoc), HTML (goquery, lynx), CSV, text, directory, notion, markdown (textutil). Use for reading documents into the conversation for analysis or RAG pipelines. Returns document content with optional splitting into chunks. Requires: source (absolute file path). Optional: type (pdf, csv, html, text — auto-detected from extension), chunkSize (split into chunks of N characters).'
parameters:
chunkSize:
type: number
description: Split into chunks of this many characters (for RAG). 0 = no splitting.
source:
type: string
description: Absolute path to the document file
required: true
type:
type: string
description: 'Document type: pdf, pdf_pdftotext, pdf_cpu, pandoc, docx, epub, rtf, odt, html, html_lynx, csv, text, textutil, directory, notion. Auto-detected from the file extension if omitted. pdf=Go lib, pdf_pdftotext=poppler, pdf_cpu=pdfcpu, pandoc=universal, docx/epub/rtf/odt=pandoc, html_lynx=lynx, textutil=macOS.'
Versions
| Version | Published | Status |
|---|---|---|
| 1.0.0 | 10/11/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.0.0
- Published
- 10/11/2026