Skip to main content
Glama
EthanCheung-gh

PDF Inspector MCP

pdf_extract_page

Extract every object from a specified PDF page—including text, words, rectangles, lines, curves, images, and tables—to inspect layout and detect tables.

Instructions

Extract every object of one page: characters, words, rectangles, lines, curves, images and tables.

page is 1-based and must be within the document. The result is one PageData object (width, height and one array per object type), suitable for inspecting layout, text runs and detected tables. Very large pages are rejected: use pdf_export with output_path for those.

Input Schema

NameRequiredDescriptionDefault
pageYes1-based page number.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations exist, so the description carries the burden, and it does disclose the 1-based indexing, the in-document bounds constraint, the rejection behavior for oversized pages, and the shape of the return value. Missing only operational details like whether the extraction is read-only/stateless or how reserved resources behave.

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?

Three short sentences, each earning its place: the action and scope first, then the page constraint, then the return shape and the fallback for large pages. No repetition or padding.

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

Completeness5/5

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

With no annotations and no output schema, the description supplies the return structure (a PageData with width, height, and per-type arrays) and states the large-page failure mode with a workaround. Nothing an agent needs in order to invoke or interpret it correctly is missing.

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 100%, so all three parameters including password and path semantics are already documented. The description's only added detail is the 1-based page rule, which the schema also states, so this is baseline territory.

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

Purpose5/5

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

States a specific verb and resource ('Extract every object of one page') and enumerates exactly what comes back (characters, words, rectangles, lines, curves, images, tables). The 'one page' scope implicitly but clearly separates it from the sibling pdf_extract_document.

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 concrete exclusion and an alternative: very large pages are rejected, so route those to pdf_export with output_path. It does not say when to prefer this over pdf_extract_document, but the per-page vs whole-document distinction is implied by the name and scope.

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