Skip to main content
Glama
Document Reader MCP Server

Document Reader MCP Server

by abdo544445

get_document_info

Retrieve document metadata, including PDF page counts, Word/PPT chunk counts, or Excel sheet names, before reading to understand document size.

Instructions

Get metadata about a document: total pages (PDF), chunks (Word/PPT), or sheet names (Excel). ALWAYS call this first before reading to understand the document size.

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": {
      "filePath": "<filePath>"
    },
    "name": "get_document_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYesAbsolute path to the file (.pdf, .docx, .xlsx, .xls, .pptx, .ppt, .csv)
passwordNoOptional password for encrypted/protected PDF files

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose the meaningful behavior: this is a cheap metadata probe whose payload varies by file type, and it should precede any read. It does not cover failure modes (corrupt files, wrong password, unsupported extension) or the response shape beyond the headline counts, leaving some operational gaps for a no-annotation tool.

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. The capability and its per-format return values come first, and the workflow directive lands second where it is most actionable.

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?

There is no output schema, so the description must describe returns, and it does so per format, which is the key information for a metadata probe. Missing are error/edge-case behavior and any note on cost or latency, minor omissions for a two-parameter read tool.

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 filePath (extension list) and password (encrypted PDFs) documented in the schema itself. The description adds the format taxonomy that motivates filePath but says nothing about password handling or what happens when a protected file is queried without one, so the schema does the heavy lifting.

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 and resource ('Get metadata about a document') and goes further by enumerating the concrete return value per format: page count for PDF, chunk count for Word/PPT, sheet names for Excel. It implicitly separates itself from the read_* siblings by being metadata-only rather than content-returning, though it never names an alternative explicitly.

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 a strong directive ordering rule: 'ALWAYS call this first before reading to understand the document size,' which tells the agent exactly where this sits in a workflow. It stops short of state-based exclusions (e.g., when it is safe to skip, or how to handle unsupported formats), so it is clear context rather than full when/when-not guidance.

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