Skip to main content
Glama

View one page of a PDF as an image

distill_page_image
Read-onlyIdempotent

Render one local PDF page as a PNG, or return a PNG/JPG/WebP file, for read-only visual inspection when a chart or image must be examined.

Instructions

Render one page of a local PDF as a PNG image (about 100 dpi), or return an image file (PNG, JPG, WebP) itself. Read-only: never modifies or uploads the file. Use it only for pages listed in visualPages by distill_file or distill_outline, and only when the question depends on the chart or image on that page: it costs far more tokens than the Markdown. One page per call (page is the physical page number, 1-based, as listed in visualPages.page). Fails with bad_request (other file types, page out of range), forbidden (outside allowed roots), too_large (over 100 MB), not_found or parse_failed.

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

Input Schema

NameRequiredDescriptionDefault
pageYesPhysical page number (1-based position in the PDF), as listed in visualPages.page; use 1 for an image file
pathYesAbsolute path, or relative to the server's working directory

Output Schema

NameRequiredDescriptionDefault
pageYes
bytesYes
widthNo
heightNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description still adds real value beyond that: it confirms the file is never modified or uploaded, states the ~100 dpi render scale and the one-page-per-call limit, and enumerates failure modes with their causes (bad_request, forbidden, too_large, not_found, parse_failed). Missing is any statement of pagination/size limits on the returned image for very large pages.

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?

Front-loaded with the core action, then safety, then usage constraints, then errors — a logical order with no filler sentences. Minor drag from the parenthetical ordering ("or return an image file (PNG, JPG, WebP) itself") and the dense packing of the usage sentence, but every clause carries distinct information.

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?

An output schema exists, so return values need no explanation, and annotations cover the safety profile. Given the narrow single-page rendering job, the description supplies everything needed to call it correctly: page source, cost tradeoff, call granularity, and error taxonomy.

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 both parameters are already documented, including the 1-based physical page semantics and the fallback of using 1 for an image file. The description largely restates the schema's page constraint rather than adding new semantics; baseline 3 applies.

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 and resource ("Render one page of a local PDF as a PNG image") with resolution (~100 dpi) and accepted file types. It also positions itself against the Markdown path and against distill_file/distill_outline, which produce the visualPages list this tool depends on, so an agent can tell it apart from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use: only pages listed in visualPages by distill_file or distill_outline, and only when the question depends on a chart or image. It adds an explicit cost tradeoff ("costs far more tokens than the Markdown") and a batching constraint (one page per call), which is exactly the guidance that prevents misuse.

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