Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as fynk MCP. If you published it, claim ownership there.

Get document text

get-document-text
Read-onlyIdempotent

Reads a document's plain text in character-based chunks.

Use this tool when:

  • You need to read a full document (e.g., to summarize, review, or compare wording).

  • You want to read more context around a match found by search-document-text.

For a specific clause or term, call search-document-text first—it is much cheaper than reading the whole document. Then pass an offset slightly before the match (e.g., 1,000 characters earlier, or 0 if the match is nearer the start) and a max_chars of a few thousand.

Works for all documents: authored in fynk, signed, or uploaded as a PDF, whose text comes from OCR with one line per paragraph.

Chunking & pagination:

  • Chunks are character slices and do not correspond to printed or PDF pages. Never cite page numbers; quote the passage or name its clause instead.

  • Each response includes total_chars, the returned range (offset to end_offset), and next_offset if more text remains. Pass next_offset as offset to continue.

  • Chunks break at paragraph or word boundaries, so a response may be shorter than max_chars.

  • Check total_chars on the first chunk before paging through the rest; only read an entire document when the task requires it.

Consistency & errors:

  • When paging or following up on search-document-text, pass the previous text_hash. If the document changed in between, the call fails instead of returning mismatched text; start again without text_hash: search again if the offset came from a search, otherwise read from offset 0.

  • If there is no text to read yet (text recognition of a PDF still running, or a new document's text not yet prepared) or none at all (password-protected PDF, unreadable scan), the call fails with a message giving the cause and whether retrying later can help.

  • The text follows an edit within a few seconds, so right after changing a document it may still show the previous wording.

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": {
      "document_uuid": "<document_uuid>"
    },
    "name": "get-document-text"
  }
}

Input Schema

NameRequiredDescriptionDefault
offsetNoCharacter offset to start reading at: 0 for the start, next_offset from a previous chunk, or an offset near a match from search-document-text.
max_charsNoMaximum characters to return (may return fewer to end on a paragraph or word boundary).
text_hashNoThe text_hash from a previous get-document-text or search-document-text response. Fails if the document's text has changed since.
document_uuidYesUUID of the document to read. If you don't have it, call list-documents to find it.

Output Schema

NameRequiredDescriptionDefault
textNoThe text of this chunk.
offsetNoThe character offset this chunk starts at.
text_hashNoIdentifies the version of the text this chunk came from. Pass it back when reading on.
end_offsetNoThe character offset this chunk ends at (exclusive).
next_offsetNoThe offset to read the next chunk from. Absent when this chunk reaches the end of the text.
total_charsNoThe length of the document's whole text, in characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses non-obvious traits: chunks are not pages (and page numbers must never be cited), chunks end on paragraph/word boundaries so responses may be shorter than max_chars, PDF text comes from OCR, text lags edits by seconds, and text_hash guards against mid-pagination drift with an explicit recovery procedure. It also enumerates failure causes (OCR running, password-protected or unreadable PDF) and whether retrying helps.

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

Conciseness4/5

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

Front-loaded with the core purpose and usage decision, then cleanly grouped under chunking, pagination, and error headings. It is on the long side and a few bullets (e.g., the total_chars reminder) restate nearby points, but nearly every sentence carries actionable information.

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?

For a paginated read tool with an output schema, this covers everything an agent needs: how to start, how to continue, how to stay consistent while paging, what invalidates the read, and how failures present. Nothing material is left to inference.

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%, so all four parameters are already documented, but the description still adds operational meaning: next_offset should be passed as offset to page, offset should be set slightly before a search match (~1,000 chars) with max_chars of a few thousand, and text_hash should be dropped and the read restarted from offset 0 if the document changed.

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 first line states a specific verb and resource ('Reads a document's plain text') plus the access granularity ('character-based chunks'), which immediately separates it from search-document-text and the metadata-oriented get-document-info.

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?

It names explicit when-to-use cases (summarize, review, compare wording; read context around a search match) and an explicit alternative with the condition that selects it: 'For a specific clause or term, call search-document-text first—it is much cheaper'. It even prescribes the offset/max_chars pattern to use after a search hit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources