Skip to main content
Glama

Read Document

read_document
Read-only

Extract readable text from PDF, Word, Excel, and PowerPoint files so AI assistants can process documents and spreadsheets that cannot be read as plain text.

Instructions

Extract readable text from a PDF (.pdf), Word (.docx), Excel (.xlsx/.xlsm), or PowerPoint (.pptx) file. Use this for documents and spreadsheets that cannot be read as plain text.

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": "read_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
max_charsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

readOnlyHint=true already declares the safety profile, so the description need only add operational context — and it does add the supported-format list. It omits notable behaviors: that output may be truncated, what happens with scanned/image PDFs, and how extraction failures surface. With annotations covering safety, a 3 is appropriate.

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?

Two sentences, zero filler, and the format list plus the usage clause are both front-loaded. Nothing repeats the title or the annotations.

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

Completeness3/5

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

The tool is simple and an output schema exists, so return-value explanation is unnecessary. However, for a 2-parameter tool with 0% schema coverage, the missing explanation of max_chars truncation and of non-text/scanned files leaves real gaps an agent would hit in practice.

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

Parameters3/5

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

Schema coverage is 0%, so the schema only names the parameters without explaining them. The description adds nothing about path (local path vs URL) or max_chars (default 20000 implies truncation but this is never stated), leaving the most consequential parameter unexplained.

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

Purpose4/5

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

States a specific verb (extract readable text) and the exact set of supported resources (.pdf, .docx, .xlsx/.xlsm, .pptx). The clause 'documents and spreadsheets that cannot be read as plain text' implicitly separates it from read_file, though it never names that sibling.

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

Usage Guidelines4/5

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

Gives clear selection context: use for binary document formats rather than plain text. It stops short of naming read_file or read_image_text as alternatives, and says nothing about scanned/image-only PDFs that need OCR, but the routing signal is clear.

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