Skip to main content
Glama

Parse Document

parse_document

Parse local PDF, DOCX, PPTX, XLSX, and text files to extract text and document elements with selectable parsing strategies, including OCR for scanned documents.

Instructions

Parse a local document and extract text.

Supports PDF, DOCX, PPTX, XLSX, and text-based files (.txt, .log, .py, etc).

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": {
      "file_path": "<file_path>"
    },
    "name": "parse_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
strategyNoParsing strategy (auto, fast, hi_res, ocr_only)auto
file_pathYesAbsolute path to file on host machine

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses the supported format set and that the file must be local (not a URL), but says nothing about failure behavior for unsupported files, size limits, or the quality/cost tradeoff between strategies such as hi_res and fast.

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 short sentences, capability stated first, format coverage second. Nothing redundant and nothing buried; the reader gets the essential facts in the first line.

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?

An output schema exists, so return shape need not be described, and the two-parameter surface is simple. The remaining gap is the strategy tradeoff (speed vs. OCR/quality), which is only name-level in the schema and unaddressed in the description.

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 description coverage is 100%, with both file_path and the strategy enum documented in the schema, so baseline is 3. The description adds no meaning beyond it — notably it never mentions the strategy parameter or when to prefer ocr_only/hi_res.

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+resource ('Parse a local document and extract text') and enumerates the supported formats, so an agent knows exactly what capability it gets. It does not explicitly differentiate itself from the sibling parse_batch, though the singular 'a local document' hints at single-file scope.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no mention of when NOT to use it, and no reference to parse_batch for multi-file work. The format list indirectly signals the applicable file universe, but the agent must infer the rest.

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

Deploy Server

Other Tools