Skip to main content
Glama

Extract text and Markdown from PDFs

extract_pdf_text
Read-onlyIdempotent

Download public PDF URLs and return clean text and/or Markdown, page count, metadata and a scanned-PDF flag (image-only PDFs return no text). Up to 2 PDFs per call, up to 50 pages each.

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": {
      "urls": "<urls>"
    },
    "name": "extract_pdf_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsYesPublic http(s) PDF URLs (max 2).
formatNoOutput format.
max_pagesNoMax pages per PDF (default 30).
include_pagesNoAdd per-page text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld), but the description adds behavior the annotations cannot: it performs network downloads, enforces per-call and per-page caps, and discloses the key failure mode that scanned PDFs return no text. It does not say what happens on a 404, a non-PDF URL, or a page-limit overflow, which is the remaining gap.

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 tight sentences, front-loaded with the core action and output payload, with the operational constraints packed into the second. Nothing is redundant or padded.

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 carries the return-value burden and does so: it lists text/Markdown, page count, metadata, and the scanned flag, plus both size limits. Error behavior for invalid or unreachable URLs is the only notable omission for a tool that fetches arbitrary remote resources.

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 every parameter including the enum for 'format' and the include_pages toggle is already documented. The description only restates the 2-URL and 50-page caps that the schema's maxItems/maximum already encode, and never mentions format or include_pages, so it adds little meaning beyond the schema baseline.

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 and resource ('Download public PDF URLs and return clean text and/or Markdown') and enumerates exactly what comes back: text/Markdown, page count, metadata, and a scanned-PDF flag. No sibling tool in the catalog touches PDFs, so there is zero ambiguity about which tool handles this request.

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 concrete operating context: URLs must be public http(s), max 2 PDFs per call, max 50 pages each, and image-only PDFs yield no text — which tells the agent when this tool will and won't produce useful output. It stops short of an explicit 'use this instead of X' exclusion, but no plausible alternative exists among the siblings.

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