Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
entry_idYesEntry ID of an electronic document.
max_charsNoTruncate the returned text after this many characters.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses behavior: text source (OCR/extraction pipeline), truncation behavior, return format, and error slugs (not_found, method_not_allowed, server_error). It also explains the dependency on v2 and the fallback.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (purpose, usage, args, returns). Front-loaded with the main action, then provides necessary details. Every sentence adds value; no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity and presence of output schema, the description covers all aspects: input parameters, output structure, error handling, version dependency, and alternative tools. It is fully self-contained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds value beyond schema: clarifies entry_id must be for an electronic document (not folder), specifies default max_chars (50,000), and explains the truncated response field.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action ('Download a document's server-extracted text'), specifies it's v2-only, and gives explicit use cases like 'summarize this document'. It distinguishes itself from siblings by mentioning the v1 limitation and fallback tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use ('needs readable contents of a document') and when not to use ('v1 servers do not expose this endpoint'), including a direct alternative (use get_document_edoc with mode='text'). Also warns against using for folders.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SamuelSHernandez/laserfiche-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server