extract_document_text
Extract plain text from document files (.txt, .md, .csv, .html, .pdf, .docx) by specifying the path. Supports files up to 20MB with configurable size limit.
Instructions
Extract plain text from a document file at a given path. Supports .txt / .md / .csv (read as UTF-8), .html (strip tags), .pdf (regex scrape — best-effort, may return [PDF text extraction yielded nothing] for image-only PDFs), .docx (xml-strip). Default size cap 5MB; override via maxBytes (up to 20MB). Returns {ok, path, ext, sizeBytes, textLength, text}.
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": "extract_document_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or working-dir-relative file path. | |
| maxBytes | No | Max file size to attempt (default 5MB). |