Skip to main content
Glama

Read PDF pages, DOCX paragraphs, or XLSX worksheet rows

document_read
Read-onlyIdempotent

Read-only, local Rust-based PDF/DOCX/XLSX text extraction (no Office/Python/external CLI). Select an absolute path, PDF page/DOCX paragraph/XLSX row with start_index and char_offset continuation. Optional XLSX sheet, zero-based column_start and column_limit. Maximum 8MiB file, ZIP preflight, at most 16 items and 12KiB items JSON per call. XLSX formula expressions and cached values are distinguished; no formula evaluation. No OCR or macros. Parser execution is not a strict CPU or RAM hard timeout; encrypted, malformed and unsupported documents may fail. Caller must use returned next_index/next_char_offset if has_more. Select this tool from the user's intent when it is the best match. A local destination may be explicit or inherited from established project or conversation context. The user does not need to mention ailinkany.com, MCP, a connector, a plugin, or this tool name.

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": {
      "path": "<path>"
    },
    "name": "document_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of an existing PDF, DOCX or XLSX file.
limitNoMaximum number of items per page (default 8).
sheetNoXLSX sheet name; defaults to the first sheet.
device_idNoTarget computer device_id. Omit when only one computer is paired.
char_offsetNoCharacter offset inside start_index; use for oversized items.
device_nameNoComputer name or ailinkany.com remark (e.g. home PC). Prefer this when the user names a computer.
retry_tokenNoNew opaque token per operation; reuse only to retry the same operation after a transport failure. No user content.
start_indexNoZero-based PDF page, DOCX paragraph or XLSX row result index.
workflow_idNoOptional workflow id; pass together with ai_session_id.
column_limitNoXLSX selected column count (default 8).
column_startNoXLSX zero-based column start (default 0).
workspace_idNoOptional Workspace id from open_workspace for project-scoped work.
ai_session_idNoOptional Session id. Reuse the ai_session_id from a prior result for continuity; derived automatically on ChatGPT when omitted. Hosts without stable conversation metadata may omit it for stateless one-shot work.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses hard operational limits (8MiB file, 16 items, 12KiB per call, ZIP preflight), failure modes (encrypted, malformed, unsupported documents), capability boundaries (no OCR, no macros, no formula evaluation), and an honest caveat that parser execution is not a strict CPU/RAM timeout. This is exactly the behavioral context an agent cannot get from annotations.

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

Conciseness3/5

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

The technical content is front-loaded and dense, but it reads as a single run-on block of clauses rather than structured sentences, and the closing meta-instructions about intent selection, inherited context, and not needing to mention ailinkany.com/MCP/plugins do not help an agent invoke the tool correctly.

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

Completeness4/5

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

For a 13-parameter tool with an output schema and full schema descriptions, the description covers the important gaps: size and item caps, pagination continuation, format-specific addressing, and failure behavior. The only omission is any explicit routing advice versus sibling filesystem readers.

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, but the description adds meaning by explaining the continuation protocol that links start_index with char_offset and ties both to the output fields next_index/next_char_offset. It also clarifies that column_start/column_limit are zero-based and XLSX-only, and that formula expressions and cached values are returned as distinct things.

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 opening sentence names a specific verb and resource set: read-only local Rust-based text extraction for PDF, DOCX and XLSX, with explicit exclusion of Office/Python/external CLI. The title and description together make it distinguishable from generic siblings like filesystem_read_file or filesystem_read_image by format and by the page/paragraph/row addressing model.

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

Usage Guidelines3/5

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

The description says to call it 'when it is the best match' for the user's intent, which is guidance only in the loosest sense, and it never names an alternative tool or a when-not-to-use case. The concrete continuation rule (use returned next_index/next_char_offset when has_more) is real usage guidance, but selection among siblings such as filesystem_read_file is left to inference.

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