Skip to main content
Glama
EthanCheung-gh

PDF Inspector MCP

pdf_get_metadata

Retrieve PDF metadata including page count, version, encryption status, page size, title, author, producer, and font names before using page tools.

Instructions

Document-level facts: page count, PDF version, encryption flag, first-page size, title/author/producer and the font names the pages reference.

Use this first to learn how many pages a document has before calling the page tools. Returns the extractor's metadata dictionary unchanged (pages, version, encrypted, page_w, page_h, title, author, producer, fonts).

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations present, the description carries the burden and does reasonably well: it discloses that the raw extractor metadata dictionary is returned unchanged and lists its keys, and the presence of a password parameter implies the encrypted-document path. It does not state error behavior (wrong/missing password on an encrypted file) or whether the whole file is parsed, which is the remaining gap.

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?

Front-loaded with the substance and the usage rule in the first two sentences. The final sentence partially repeats the field list from the first sentence, which is mild redundancy but also serves as the de facto return-value specification absent an output schema.

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?

No output schema exists, and the description compensates by enumerating the returned keys. Combined with the 100%-covered input schema and the explicit 'use first' routing, an agent has what it needs; only failure modes for encrypted PDFs are unaddressed.

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%: path and password are fully documented in the schema, including the note that the .pdf suffix is not required. The description adds no syntax or format detail beyond that, so the baseline of 3 applies.

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?

The description names a specific resource (document-level metadata) and enumerates exactly what is returned: page count, version, encryption flag, page size, title/author/producer, font names. It also distinguishes itself from the page-extraction siblings by positioning itself as the first call to discover page count.

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?

"Use this first to learn how many pages a document has before calling the page tools" gives an explicit ordering and routing rule relative to siblings. It stops short of naming when NOT to use it (e.g., when you already need full text, use pdf_extract_document), so it is clear but not exhaustive.

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