Skip to main content
Glama
EthanCheung-gh

PDF Inspector MCP

pdf_extract_document

Extract all objects from each page of a PDF, either the entire document or a specified page range, and return metadata, page count, and per-page object data.

Instructions

Extract every object of every page in a range: the whole document, or first_page..last_page.

Omit both bounds for the whole document. Returns {'metadata', 'pageCount', 'pages'} where pages holds one PageData object per extracted page and pageCount is the number of pages actually returned, not the document's total. Large documents should be read in ranges, or exported with pdf_export.

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the PDF: absolute, or relative to the server process working directory. Any readable regular file is accepted; the .pdf suffix is not required.
passwordNoPassword for an encrypted PDF. Omit or pass null for unprotected documents.
last_pageNoLast page to extract (1-based, inclusive). Defaults to the last page.
first_pageNoFirst page to extract (1-based, inclusive). Defaults to page 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does add real value: it discloses the return dict shape and clarifies that pageCount is the number actually returned, not the document total — a non-obvious behavior. It also warns that large documents should be chunked, implying resource constraints, though it does not state read-only safety explicitly or describe failure behavior for missing/encrypted files.

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?

Scoping and default behavior are front-loaded in the first two sentences, followed by return-shape info. Slightly dense prose with parenthetical keys, but every sentence carries information an agent needs.

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 explain returns — it does, naming 'metadata', 'pageCount', and 'pages' plus PageData per page, and clarifies the pageCount semantic. It stops short of describing what PageData fields contain, which for a nested return type would be the last missing piece.

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%, so the baseline is 3. The description restates the range semantics ('first_page..last_page', omit both for whole document) in a useful summarized form, but adds no format detail beyond what the schema's parameter descriptions already say.

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?

The description uses a specific verb and resource ('Extract every object of every page in a range') and states the scope precisely, distinguishing full-document from ranged extraction. It never names pdf_extract_page, the closest sibling for single-page extraction, so the differentiation is implicit rather than explicit.

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?

It gives concrete operating guidance: 'Omit both bounds for the whole document' and 'Large documents should be read in ranges, or exported with pdf_export', naming an alternative and the condition that selects it. What's missing is any routing to pdf_extract_page for single-page reads or pdf_get_metadata when only document info is needed.

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