Skip to main content
Glama

PDF info

pdf_info
Read-only

Inspect a PDF's page count, title, author, text layer, tagging, and encryption before reading it, so you can decide whether OCR or deeper extraction is needed.

Instructions

Metadata and diagnosis of a PDF: page count, title, author, whether pages have a text layer (scanned pages need OCR), whether it is tagged or encrypted. Cheap: call it first on a PDF you have not seen, to decide how much to read.

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": {
      "path": "<path>"
    },
    "name": "pdf_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath of the PDF file: absolute, or relative to the server's working directory.
passwordNoPassword of an encrypted PDF. Only when an error asks for it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond readOnlyHint=true the description adds a cost signal ("cheap"), states the tool is non-destructive diagnosis, and explains that scanned pages lack a text layer and need OCR. It does not cover error behavior or the fact that the output is textual summary only, which keeps it below 5.

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?

Two sentences, zero filler: the first lists the payload, the second gives the calling strategy. Front-loaded with the resource, then the actionable advice.

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?

With no output schema, the description usefully enumerates the return contents and the OCR caveat, which is enough to interpret results. Minor gaps remain around whether failures are raised as errors and how the encrypted flag relates to the password flow.

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%, so path and password are already documented. The description only indirectly connects encryption detection to the password parameter; it adds no syntax or path-format detail beyond the schema, 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?

The description names a specific verb (inspect/report metadata and diagnosis) and enumerates the exact fields returned: page count, title, author, text-layer presence, tagging, encryption. That enumeration separates it cleanly from pdf_to_markdown and pdf_toc, which consume rather than describe a PDF.

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?

It gives an explicit sequencing rule — call this first on an unseen PDF to decide how much to read — which implicitly positions the extraction siblings as the follow-up step. There is no explicit when-not or named alternative, so it falls short of the full 5.

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

Deploy Server

Other Tools