Skip to main content
Glama
pdf-mcp
by jkp

Read PDF

read_pdf
Read-only

Extract text from a PDF, optionally limited to specific pages or ranges. Use it to read document contents for summarization, search, or data extraction.

Instructions

Extract text from a PDF, optionally specific pages.

Args: filename: PDF filename (e.g., "2024-01-15 Invoice.pdf") pages: Optional page range (e.g., "1-3", "5", "1,3,5"). Omit for all pages.

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": {
      "filename": "<filename>"
    },
    "name": "read_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
pagesNo
filenameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes this is a safe, non-mutating read, and the description adds little beyond that. It does not disclose meaningful behavioral caveats such as whether scanned/image PDFs return empty text, whether page numbers are 1-based, or how out-of-range pages are handled, which are the real risks for a text-extraction call.

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?

The purpose sentence is front-loaded and the remaining text is a compact per-parameter block with concrete examples. There is essentially no filler, though the Args-style formatting is slightly redundant with a schema that already lists the same two properties.

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?

With only two parameters, an output schema that defines the return shape, and readOnlyHint covering safety, the description supplies most of what an agent needs to invoke it correctly. The remaining gap is behavioral caveats about text-less or unreadable PDFs rather than structural information.

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 description coverage is 0%, so the description must carry the burden, and it does: it shows a realistic filename example and spells out the page-range syntax ("1-3", "5", "1,3,5") that the schema's bare anyOf string type cannot convey. It falls short of explaining what path or location the filename is resolved against.

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?

"Extract text from a PDF, optionally specific pages" gives a concrete verb (extract text) and resource (PDF), which is enough to separate it from siblings like get_pdf_info or rename_pdf. It never names those siblings, so the differentiation is inferred rather than stated.

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 implies this is the tool for pulling content out of a document, but it offers no explicit when-to-use rule, no exclusions, and no pointer to alternatives such as search_pdfs when the agent only needs a snippet. The "Omit for all pages" note guides the parameter, not tool selection.

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