Skip to main content
Glama

PDF information

get_pdf_info
Read-only

Inspect an unknown PDF to get page count, sizes, metadata, encryption status, and pages lacking a text layer, so you can decide whether to extract, OCR, or search.

Instructions

Reads a PDF's overview and returns it as text: page count, page sizes in mm, title, author, subject, keywords, creating program, dates, whether it is encrypted, and which pages have no text layer (scans that need recognize_text). Call it first on an unknown file to decide what to do next; for the text itself use extract_text, to find a word use search_pdf. Read-only. An encrypted PDF needs its password; a missing or damaged file is reported as an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path of the PDF.
passwordNoPassword, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.9
    • changedInput schema / properties / password / description
      Previous value: -"Password, if the PDF is encrypted."New value: +"Password, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it."
  2. First observedv1.0.6

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description reinforces read-only while adding real context: encrypted PDFs require a password, missing/damaged files surface as errors, and scanned pages without a text layer are flagged as needing recognize_text. It doesn't describe output formatting or pagination, but for a read-only inspector this is well beyond the annotation baseline.

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?

Front-loaded with what it returns, then routing guidance, then behavioral notes. Three dense sentences with semicolon-delimited lists; every clause carries distinct information and nothing is wasted.

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 output schema, the description must convey the return payload, and it does so field by field. It also covers the password requirement, the error case for missing/damaged files, and downstream routing, leaving no gap an agent needs before calling it.

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 both parameters are already documented in the schema. The description's remark that an encrypted PDF needs its password restates the schema text rather than extending it, so the baseline 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?

Specific verb+resource (reads a PDF's overview, returns text) followed by an explicit enumeration of what the overview contains (page count, sizes in mm, metadata fields, encryption status, pages lacking a text layer). This clearly separates it from extract_text and search_pdf, which it names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when-to-use rule ('Call it first on an unknown file to decide what to do next') and routes to alternatives with conditions ('for the text itself use extract_text, to find a word use search_pdf'). Exclusions and alternatives are both covered.

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