laserfiche_document_get_text
Download server-extracted text from a Laserfiche document for summarization or readability, avoiding raw binary parsing.
Instructions
Download a document's server-extracted text (v2-only).
Use for "summarize this document", "what does this say", or any other task that needs the readable contents of a document rather than the raw binary. The text comes from Laserfiche's own extraction pipeline (OCR for image documents, upstream extraction for office files), so you get clean text without having to parse a PDF yourself.
v1 servers do not expose this endpoint. If your deployment is on
v1 (the default), this tool returns a structured error at the client
layer. Use get_document_edoc(entry_id, mode="text") instead — it
fetches the raw edoc and extracts text client-side (pypdf for PDFs,
direct decode for text/* MIME types).
Args:
entry_id: Integer entry ID of an electronic document (not a folder).
max_chars: Truncate the returned text after this many characters
(default 50,000). The response's truncated field signals
whether truncation occurred.
Returns: {"entry_id": <int>, "text": <str>, "char_count": <int>, "truncated": <bool>} on success.
On failure: returns {"mode": "error", "error": <slug>, "entry_id": <int>, ...}. Common slugs: not_found (entry is a
folder, or has no extracted text), method_not_allowed /
server_error (v1 server — fall back to get_document_edoc).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entry_id | Yes | Entry ID of an electronic document. | |
| max_chars | No | Truncate the returned text after this many characters. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||