Skip to main content
Glama

Read a PDF's pages, properties and form

get_pdf_info
Read-only

Reads a PDF without changing it: the page count and the size of every page, whether it is password-protected, its document properties, and its form, with every field by its full name, label, type, value and the options it takes. Read it before fill_pdf_form, which takes the fields by these names, and before redact_pdf or split_pdf, which work on these pages. Pass exactly one PDF: source, a render or library file of the workspace, or file_base64, the PDF itself. Free on every plan; it creates no render, and an uploaded PDF is read and not kept.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_pdf_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceNoA PDF of the workspace: the rnd_ id of a PDF render, or a PDF of the file library by name (such as terms.pdf) or fil_ id
file_nameNoName of the PDF given as file_base64 or path, e.g. contract.pdf; the results are named after it
file_base64NoThe PDF itself, base64 encoded, up to 20 MB; sent with the request and not kept

Output Schema

NameRequiredDescriptionDefault
formNoThe form; null when the file needs a password to open
pagesYesThe size of every page, in points (72 an inch) and millimetres
sourceNoThe render id or library file name the PDF came from
metadataYesTitle, author, subject, producer and creator; null when unset
encryptedYesWhether the file is password-protected
page_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered by structured data. The description still adds genuinely non-redundant behavior: it creates no render, an uploaded PDF is not retained, and it is free on every plan. These are real side-effect and cost disclosures, but the return shape is left to the output schema, so this is solid rather than exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The output list is front-loaded immediately after the verb, and the ordering advice follows, so the structure matches how an agent reads it. The opening sentence is a long run-on enumeration of five return categories, which costs some scanability, but no sentence 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?

For a read-only inspection tool with full schema descriptions, complete annotations and an output schema, the description covers the remaining burden: scope, side effects, retention, cost, and sequencing relative to downstream tools. 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 coverage is 100%, so the baseline is 3. The description does add one thing the schema cannot express: 'Pass exactly one PDF' — the schema lists three optional properties with no required field and no mutual exclusion, so the exactly-one constraint is a meaningful contribution. It stops short of clarifying what file_name means when the source is a render or library id.

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 opens with a specific verb and resource ('Reads a PDF without changing it') and then enumerates exactly what is returned: page count, per-page size, password protection, document properties, and the full field inventory of the form. It explicitly distinguishes itself from fill_pdf_form, redact_pdf and split_pdf, so an agent can route correctly without opening another schema.

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?

It names the three sibling tools it precedes and states why in each case ('takes the fields by these names', 'work on these pages'), giving an explicit prerequisite ordering. It also states the one-PDF input rule, which functions as a usage constraint rather than just a parameter note.

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.

Resources