Inspect PDF metadata
inspect_pdfInspect a PDF to retrieve version, page count, encryption state, PDF/A claim, signatures, and attachments. Perform CI-style assertions to verify properties like pdfa, signed, encrypted, placeholder, or attachments.
Instructions
Read-only inspection of an existing PDF: version, page count, encryption state, PDF/A claim, signature count, hasSignaturePlaceholder, embedded attachments[], document info / metadata. Use the check array for CI-style assertions — supported values: 'pdfa', 'signed' (true when at least one signature has signed content), 'encrypted', 'placeholder' (unsigned /Sig widget present), 'attachments' (at least one /EmbeddedFile). The checksPassed boolean is true only when ALL requested checks hold.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| check | No | Optional CI assertions. The result.checksPassed flag is true only when every requested check holds (e.g. ['pdfa','signed']). | |
| pages | No | When true, include per-page metadata in the response. | |
| fields | No | Optional dot-path projection applied to the structured result (e.g. ['pageCount','signatureCount']). Composes after verbosity. Unknown paths are omitted. | |
| pdfBase64 | Yes | Base64-encoded PDF bytes to inspect. | |
| verbosity | No | Response verbosity. 'full' (default) returns every field; 'summary' returns a token-frugal scalar subset (version, pageCount, encryption, pdfA, signatureCount, hasSignaturePlaceholder, attachmentCount) — drops the attachments[], info and perPage arrays. | full |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| info | No | Document /Info dictionary entries decoded as strings. | |
| pdfA | No | Detected PDF/A claim (e.g. '1B', '2B', '2U', '3B') from XMP metadata, or null when absent. | |
| checks | No | ||
| perPage | No | ||
| version | Yes | PDF version (e.g. "1.7"). | |
| pageCount | Yes | ||
| encryption | Yes | ||
| pageLabels | No | Logical page-numbering ranges from the /PageLabels number tree (ISO 32000-1 §12.4.2), or absent when the document has none. Each range gives the 0-based first page, numbering style, optional prefix and start value. | |
| attachments | Yes | Embedded files exposed via /Names → /EmbeddedFiles (PDF/A-3, Factur-X). | |
| checksPassed | No | ||
| signatureCount | Yes | ||
| hasSignaturePlaceholder | Yes | True when at least one signature widget exists with empty /Contents — i.e. an unsigned placeholder awaiting `sign_pdf`. |