Skip to main content
Glama

pdf_render_page

Read-onlyIdempotent

Render one PDF page to a PNG image at up to 300 DPI to read scanned pages, from a path, base64 data, or HTTPS URL; optionally save the image.

Instructions

Render one PDF page to a PNG image (dpi up to 300, default 110) and return it as an image, e.g. to read a scanned page. The PDF is a path in the root folder, base64 data, or an https url. Optionally also save the PNG inside the root folder (needs a writable server). Needs PDFium.

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": {
      "page": "<page>"
    },
    "name": "pdf_render_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
dpiNoResolution, 1 to 300 (default 110).
urlNoAn https:// URL to fetch the PDF from, instead of `path` (up to 8 MiB).
dataNoBase64 PDF bytes, instead of `path` (up to 8 MiB).
pageYesPage number, 1-based.
pathNoPDF file, relative to the root folder. Give exactly one of path, data, url.
save_asNoAlso save the PNG at this path relative to the root (needs --writable).
overwriteNoReplace `save_as` if it exists (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / data / default
      Removed value: -null
    • changedInput schema / properties / data / type
      Previous value: -[
      -  "string",
      -  "null"
      -]New value: +"string"
    • removedInput schema / properties / dpi / default
      Removed value: -null
    • removedInput schema / properties / dpi / format
      Removed value: -"uint32"
    • removedInput schema / properties / dpi / minimum
      Removed value: -0
    • changedInput schema / properties / dpi / type
      Previous value: -[
      -  "integer",
      -  "null"
      -]New value: +"integer"
    • removedInput schema / properties / page / format
      Removed value: -"uint32"
    • removedInput schema / properties / page / minimum
      Removed value: -0
    • removedInput schema / properties / path / default
      Removed value: -null
    • changedInput schema / properties / path / type
      Previous value: -[
      -  "string",
      -  "null"
      -]New value: +"string"
    • removedInput schema / properties / save_as / default
      Removed value: -null
    • changedInput schema / properties / save_as / type
      Previous value: -[
      -  "string",
      -  "null"
      -]New value: +"string"
    • removedInput schema / properties / url / default
      Removed value: -null
    • changedInput schema / properties / url / type
      Previous value: -[
      -  "string",
      -  "null"
      -]New value: +"string"
  2. First observedv0.1.3

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint/openWorldHint/idempotentHint, so the description usefully adds the PDFium dependency, the writable-server requirement for save_as, and that the render is capped at 300 dpi. The disclosure that the tool can write a file slightly understates readOnlyHint, but the description itself is not the misleading party.

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?

Three front-loaded sentences open with the action and return type, then inputs, then side effects and dependency; nothing is padded. The input-source sentence partly duplicates the schema, which keeps it from a perfect score.

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 7-parameter render tool with no output schema and thin annotations, the description covers input sourcing, output form (an image), the optional on-disk write with its permission caveat, and the runtime dependency. An agent has what it needs to call it correctly without opening the schema.

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 path/data/url exclusivity and dpi range is already documented. The description restates the three input sources and the dpi ceiling but adds no format or edge-case detail beyond the schema, so the 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 precise verb+resource+output: render one PDF page to a PNG image, returned as an image, with dpi bounds and default. The clause 'e.g. to read a scanned page' implicitly separates it from the text-extraction siblings (pdf_text, pdf_search, pdf_info), though none is named explicitly.

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 a concrete triggering scenario ('to read a scanned page') and a prerequisite ('Needs PDFium'), plus the optional save path requiring a writable server. It stops short of stating when to prefer a sibling such as pdf_text instead, so there is clear context but no exclusions.

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