Skip to main content
Glama
formfeed

formfeed

Official

Read a PDF's pages, properties and form

get_pdf_info
Read-only

Reads a PDF's page count, page sizes, password protection, document properties and form fields without changing it. Use it to get field names before filling forms or to check pages before redacting or splitting.

Instructions

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; path, a file on this machine; or file_base64. 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
pathNoAbsolute path of a PDF on this machine, up to 100 MB; sent with the request and not kept
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. Addedv0.3.26

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/non-destructive/closed-world, and the description adds information they cannot carry: it is free on every plan, it creates no render, and an uploaded PDF is read and not retained. Those cost, side-effect and data-retention facts materially change an agent's willingness to call it.

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 inventory is front-loaded and the ordering advice follows, with no filler sentences. The first sentence is a long comma-chained list that is slightly harder to scan than split bullets would be, which keeps it from a 5.

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 four-parameter read tool with full schema coverage and an output schema, everything an agent needs is present: what it returns, which input route to pick, sequencing against three siblings, and cost/retention behavior. No meaningful gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds the crucial constraint the schema omits: the four parameters are mutually exclusive routes and exactly one must be supplied ("source…; path…; or file_base64"). That resolves a real ambiguity for a zero-required-parameter object. It stops short of adding format detail beyond the schema, so not a 5.

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?

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 form fields by name, label, type, value and options. An agent can distinguish this from render/convert/compress siblings without opening the 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?

States explicit sequencing against named alternatives: "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." It also states the invocation constraint ("Pass exactly one PDF") and which of the three input routes to choose, so when-to-use and how-to-use are both covered.

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