Skip to main content
Glama

rx_get_document_text

Read-only

Retrieves document text from the default version to summarize content or find terms, amounts, and deadlines across common file types; read-only, with paging and offset for long text.

Instructions

Текст версии документа, по умолчанию последней. Используйте, чтобы пересказать документ или найти в нём условия, суммы, сроки. Читает docx, xlsx, pptx, pdf с текстовым слоем, txt, md, csv, json, xml, html, rtf. Скан (pdf без текста) и документ-картинку (jpg, png, tiff) возвращает изображениями страниц: прочитайте текст с них сами; по умолчанию 3 страницы, дальше page_from. Длинный текст обрезается по max_chars, продолжение через offset. Если в тексте pdf не хватает страниц или важны печати и подписи, повторите с as_images=true. Id документа берётся из rx_find_documents. Только чтение.

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": {
      "id": "<id>"
    },
    "name": "rx_get_document_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId документа
grepNoпоказать только строки с этой подстрокой (регистр не важен) и их номера; для логов и длинных текстов, например ERROR или номер договора
pagesNoдля скана и as_images: сколько страниц картинками, по умолчанию 3, максимум 10
offsetNoс какого символа продолжить, если текст обрезан
as_imagesNotrue = отдать страницы PDF картинками, даже если текстовый слой есть; нужно, когда часть страниц сканы или важны печати и подписи
max_charsNoлимит символов, по умолчанию из настроек сервера
page_fromNoдля скана и as_images: с какой страницы показывать картинки, с 1
version_idNoId версии; по умолчанию последняя

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.17.0
    • addedInput schema / properties / grep
      Added value: +{
      +  "description": "показать только строки с этой подстрокой (регистр не важен) и их номера; для логов и длинных текстов, например ERROR или номер договора",
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv0.10.1
    • addedInput schema / properties / as_images
      Added value: +{
      +  "description": "true = отдать страницы PDF картинками, даже если текстовый слой есть; нужно, когда часть страниц сканы или важны печати и подписи",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / page_from
      Added value: +{
      +  "description": "для скана и as_images: с какой страницы показывать картинки, с 1",
      +  "type": "integer"
      +}
    • addedInput schema / properties / pages
      Added value: +{
      +  "description": "для скана и as_images: сколько страниц картинками, по умолчанию 3, максимум 10",
      +  "type": "integer"
      +}
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the description doesn't need to argue safety, though it still repeats 'Только чтение'. It adds real behavioral value beyond the annotations: that scans and image documents come back as page images the agent must OCR itself, that long text is truncated at max_chars with offset continuation, and that only the first pages are returned unless page_from is used. It says nothing about auth/permissions or response envelope, keeping it short of a 5.

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 statement, then use cases, then format coverage, then edge-case handling — a logical reading order with no filler sentences. It is dense and slightly repetitive of schema facts (default 3 pages, max 10), which keeps it from a 5.

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?

There is no output schema and no annotation coverage of return values, so the description carries that burden and does: text for text-layer documents, page images for scans/pictures, truncation and continuation semantics. Nothing an agent needs to invoke it or interpret results is missing.

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 the schema already carries parameter documentation and baseline 3 applies. The description adds workflow meaning rather than syntax: it ties offset to truncation, page_from to the image mode, and as_images to the 'pdf text layer is insufficient' case, which is more than the per-field strings convey alone.

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?

States a concrete verb+resource: returns the text of a document version, defaulting to the latest, and enumerates the supported formats (docx, xlsx, pptx, pdf with text layer, txt, md, csv, json, xml, html, rtf). An agent can immediately tell this apart from metadata-style siblings like rx_get_document or discovery tools like rx_find_documents.

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?

Gives explicit use cases (retell a document, find conditions/amounts/deadlines), the escalation path when the text layer is missing or seals/signatures matter ('повторите с as_images=true'), the continuation path for truncated text (offset), and where the id comes from (rx_find_documents). Nearly every when/when-not decision is pre-answered.

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