Read PDF metadata
read_pdfRead PDF metadata to inspect page count, encryption status, version, title, author, subject, and keywords before choosing how to process the file.
Instructions
Read a single PDF's document-level metadata without parsing its content.
Returns a JSON object with: page_count, is_encrypted, version, title,
author, subject, keywords, and (when include_page_details=true) a pages
array of {index, width, height, rotation}. Read-only: never modifies the
file.
Use this to inspect what a PDF is before deciding how to process it. For structural validation, corruption/PDF-A checks, or comparing two files use analyze_pdf instead; for the actual text use extract_text. Encrypted files without a password return {is_encrypted, locked, message} rather than metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the PDF file, relative to the configured workspace. | |
| password | No | User password to unlock an encrypted PDF. Omit for unencrypted files; if omitted on an encrypted file the tool reports it as locked instead of failing. | |
| include_page_details | No | When true, also return per-page width, height (in PDF points) and rotation. Off by default to keep the response small. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |