Skip to main content
Glama

pdf_extract

Extract text per page, outlines, metadata, and token count estimates from PDFs so multi-page reports, contracts, and legal documents can be ingested into context.

Instructions

Extract text per page, outlines, document metadata, and accurate token count estimates from PDF documents. Use when ingesting multi-page reports, whitepapers, contracts, or legal documents into context. Read-only and idempotent.

Input Schema

NameRequiredDescriptionDefault
urlNoDirect HTTPS URL to download the target PDF file.
max_pagesNoMaximum number of consecutive pages to extract (1 to 50, default 15).
start_pageNo1-based index of the first page to extract (default 1).
file_base64NoBase64-encoded binary content of the PDF file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.3
    • changedInput schema / properties / file_base64 / description
      Previous value: -"Base64-encoded PDF binary"New value: +"Base64-encoded binary content of the PDF file."
    • changedInput schema / properties / max_pages / description
      Previous value: -"Maximum pages to extract (default 15)"New value: +"Maximum number of consecutive pages to extract (1 to 50, default 15)."
    • changedInput schema / properties / start_page / description
      Previous value: -"Starting page number (default 1)"New value: +"1-based index of the first page to extract (default 1)."
    • changedInput schema / properties / url / description
      Previous value: -"Direct URL of the PDF"New value: +"Direct HTTPS URL to download the target PDF file."
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well by declaring the operation read-only and idempotent. It also lists what is returned (per-page text, outlines, metadata, token estimates), though it omits details like file-size limits, rate limits, or pagination behavior beyond the schema.

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 tightly written sentences, front-loaded with the action and outputs, followed by usage context and safety traits. No filler or redundant restatement of the name or schema.

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?

For a tool with no output schema, the description usefully enumerates the returned artifacts (text, outlines, metadata, token counts). It leaves out input-mode selection guidance and size or rate constraints, but the core extraction contract is clear enough to invoke correctly.

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 URL, base64, max_pages, and start_page are already fully documented in the schema. The description adds no parameter-level guidance such as when to prefer URL versus file_base64, so the 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?

States a specific verb (extract) and concrete resources (text per page, outlines, metadata, token counts) from PDFs. This clearly distinguishes it from sibling tools like web_reader or summarize, which are not PDF-specific extraction tools.

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?

Provides clear usage context: ingesting multi-page reports, whitepapers, contracts, or legal documents. It does not explicitly name alternatives or exclusions, but the document-type guidance is sufficiently specific to route most calls correctly.

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