Skip to main content
Glama

Get PDF Page Images

get_pdf_page_images
Read-onlyIdempotent

Use this when you need to visually inspect PDF pages to identify content that cannot be detected from text alone — for example, pages containing a logo, a photograph, a watermark, a QR code, or any visual element. Returns rendered JPEG screenshots as images you can see. Returns at most 10 pages per call. ALWAYS start from start_page=1 and paginate through the ENTIRE document: check 'has_more' in structuredContent — if true, call again with start_page=next_start_page. Repeat until has_more is false. You must finish scanning all pages before answering the user's question or performing any action (e.g. deletion). Requires: pip install pymupdf

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of pages to render per call (capped at MAX_IMAGE_PAGES).
job_idYesJob ID of the PDF to render.
session_idYesSession ID that the job belongs to.
start_pageNo1-based page number to start from (default 1).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes
showingYesInclusive 1-based page range rendered in this call.
has_moreYes
page_countYes
session_idYes
next_start_pageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Response data structure for rendered PDF page images.\n\n圖片本身走 content 的 ImageContent,這裡只描述分頁進度,\n讓模型知道還要不要繼續往下翻。",
      +  "properties": {
      +    "has_more": {
      +      "title": "Has More",
      +      "type": "boolean"
      +    },
      +    "job_id": {
      +      "title": "Job Id",
      +      "type": "string"
      +    },
      +    "next_start_page": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Next Start Page"
      +    },
      +    "page_count": {
      +      "title": "Page Count",
      +      "type": "integer"
      +    },
      +    "session_id": {
      +      "title": "Session Id",
      +      "type": "string"
      +    },
      +    "showing": {
      +      "description": "Inclusive 1-based page range rendered in this call.",
      +      "properties": {
      +        "end": {
      +          "title": "End",
      +          "type": "integer"
      +        },
      +        "start": {
      +          "title": "Start",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "start",
      +        "end"
      +      ],
      +      "title": "PageImageRange",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "session_id",
      +    "job_id",
      +    "page_count",
      +    "showing",
      +    "has_more",
      +    "next_start_page"
      +  ],
      +  "title": "GetPdfPageImagesResponse",
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds significant behavioral context: returns rendered JPEG screenshots, caps at 10 pages per call, requires pagination via 'has_more' and 'next_start_page', and mandates scanning all pages before answering. It also notes the pip install prerequisite, which is useful for runtime setup.

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?

The description is dense but front-loaded with the primary use case. It uses a clear structure: when to use, what it returns, limitations, and a mandatory workflow. Every sentence serves a purpose, and the critical pagination rule is highlighted with 'ALWAYS' and 'MUST.' No filler or redundancy.

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?

Given the complexity of paginated rendering, the description fully covers the required workflow, including the loop condition, how to read structuredContent, and the requirement to complete scanning before any action. The output schema is not displayed here, but the description compensates by explaining the response semantics (has_more, next_start_page).

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 coverage is 100% with descriptions for all parameters. The description adds operational semantics by explaining how to use start_page and count in the pagination loop (start from 1, use next_start_page, respect the 10-page cap). This goes beyond the schema's simple default and type info.

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 clearly states the tool's purpose with a specific verb+resource: 'visually inspect PDF pages to identify content that cannot be detected from text alone.' It explicitly differentiates from siblings like view_pdf and get_pdf_info by focusing on visual elements (logo, photograph, watermark, QR code).

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?

The description provides explicit 'when to use' context ('Use this when you need to visually inspect PDF pages...') and gives detailed step-by-step pagination instructions. It does not explicitly name alternative tools or when-not-to-use scenarios, but the context strongly implies the tool is for visual content only, so it earns above baseline.

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.