Skip to main content
Glama

rx_get_document_text

Read-only

Extract text from a Directum RX document version to summarize content or find terms, amounts, and deadlines. Reads common office, PDF, text, and markup files; scans return page images.

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. Только чтение.

Input Schema

NameRequiredDescriptionDefault
idYesId документа
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. 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"
      +}
  2. 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, so the description's 'Только чтение' is somewhat redundant. It does add real behavior beyond annotations: supported formats, that scans/images are returned as page images (default 3, more via page_from), truncation by max_chars with offset continuation. Missing: rate limits or how version_id selection interacts with pagination.

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?

Six dense sentences, each carrying information (formats, scan handling, truncation, as_images, id source, read-only). Front-loaded with purpose. Slightly packed, but there is no filler to cut.

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?

With no output schema, the description carries the return-value burden and does so: text for text-layer documents, page images for scans, truncation and continuation semantics. An agent can call this correctly across all 7 parameters without further context.

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 baseline is 3. The description goes further by wiring parameters into behavior: offset continues truncated text, as_images triggers image return for scans, pages/page_from govern image batches. Much of this overlaps with schema text, so it is incremental rather than essential.

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 specific verb and resource: returns the text of a document version, defaulting to the latest. It clarifies the return shape (text vs. page images for scans) so an agent knows exactly what it gets. It references rx_find_documents as the id source, though it does not explicitly contrast with rx_get_document.

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?

Explicit when-to-use ('пересказать документ, найти условия, суммы, сроки'), when to switch to as_images=true (scanned pages, seals/signatures), and how to continue truncated text via offset. It also states where to obtain the id, routing the agent correctly.

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