Skip to main content
Glama
PDF MCP Server
by oriondean

fetch_and_parse_pdf

Fetches a PDF from a URL and extracts text, renders pages as images, or combines both with automatic mode selection for AI-ready content.

Instructions

Fetches a PDF from a URL and parses it. Supports multiple modes: text extraction, image rendering, hybrid (text + images), or auto-detection. Use text mode for text-heavy documents, images mode for visual content, hybrid for mixed content, or auto to let the tool decide based on document analysis.

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": {
      "url": "<url>"
    },
    "name": "fetch_and_parse_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
dpiNoDPI for image rendering (72-300, default 150)
urlYesURL of the PDF to fetch and parse
modeNoExtraction mode: text (text only), images (render all pages), hybrid (text + key images), auto (intelligent detection)auto
pagesNoSpecific page numbers to render (only used in images/hybrid mode)
maxPagesNoMaximum number of pages to render as images

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It discloses the mode-dependent behavior and that auto mode performs document analysis, but says nothing about network/access requirements, size or page limits, failure modes, or whether the call writes anything. The remaining gaps are moderate for a read-only fetch operation.

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?

Two sentences, front-loaded with the core action, followed by mode guidance. The second sentence partly restates the schema enum values, but it serves the selection decision, so the redundancy is mild rather than wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has five parameters and no output schema, so the description should clarify what comes back from each mode (extracted text, rendered images, both). It never describes the return shape or how results are delivered, leaving a meaningful gap for a multi-mode parser.

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 description coverage is 100%, with dpi, mode, pages, and maxPages all documented inline in the schema. The description's mode commentary echoes the enum descriptions already present, and it adds nothing about page selection or dpi trade-offs, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Fetches a PDF from a URL and parses it') and immediately names the four extraction modes. It does not explicitly distinguish itself from the sibling upload_pdf_to_gemini (URL fetch vs. local file upload), so the differentiation is only implied by the word 'URL'.

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?

Gives clear selection criteria among modes: text mode for text-heavy documents, images for visual content, hybrid for mixed content, auto to let the tool decide. It stops short of any exclusion guidance, such as when to prefer the sibling upload tool or when not to use this at all.

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