Skip to main content
Glama

Read PDF metadata

pdf_metadata
Read-onlyIdempotent

Read a PDF's document info: page_count, per-page width/height (points) and rotation, title, author, subject, keywords, creator, producer, creation_date, modification_date (ISO 8601, null when absent), whether it was encrypted, and has_form / form_field_count. Call this to learn a document's size and shape before splitting, rotating or filling. Read-only: the PDF is fetched but never modified.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pdf_path": "<pdf_path>"
    },
    "name": "pdf_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
passwordNoPassword to open the input, only needed for a user-password PDF (owner-locked files with an empty user password open without it).
pdf_pathYesPDF source: an https:// URL or a data:application/pdf;base64,… URI (this hosted server cannot read local file paths).

Output Schema

NameRequiredDescriptionDefault
pagesYes
titleNo
authorNo
creatorNo
subjectNo
has_formYes
keywordsNo
producerNo
encryptedYes
page_countYes
creation_dateNo
form_field_countYes
modification_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description reinforces this with "the PDF is fetched but never modified," which matters for a tool whose source can be a remote URL (openWorldHint). It adds genuine behavioral detail beyond the annotations — ISO 8601 date formatting and explicit null-when-absent semantics — though it says nothing about failure modes for malformed or password-protected files beyond what the password param implies.

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 sentences, front-loaded with the returnable field list, then the usage trigger, then the safety guarantee. The long enumeration is dense but every item is a distinct output field an agent would otherwise have to discover by calling the tool.

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?

An output schema exists, so the description need not explain return values — yet it still enumerates them, and it covers the read-only guarantee and the pre-mutation inspection use case. For a two-parameter read tool with full annotation coverage, nothing an agent needs in order to call 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 description coverage is 100%, including the non-obvious constraint that local file paths are unsupported and the password/owner-lock nuance, so the schema already carries the parameter burden. The description adds no parameter-level meaning of its own and does not mention password handling, which is the one non-trivial case. Baseline 3 is appropriate.

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 ("Read a PDF's document info") followed by an explicit field inventory (page_count, per-page dimensions, encryption flag, form fields), so the agent knows exactly what comes back. The note about calling it before splitting/rotating/filling implicitly distinguishes it from the mutation siblings like pdf_split and pdf_rotate.

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?

"Call this to learn a document's size and shape before splitting, rotating or filling" gives a clear triggering condition tied to concrete downstream operations. It does not, however, address how this differs from pdf_inspect, the most likely ambiguous sibling given its name, leaving that routing decision to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.