Skip to main content
Glama

Preview a print

preview
Read-only

Render pages exactly as printing would, using identical settings, and return page images without paper so you can verify layout, frames, or watermarks first.

Instructions

Render exactly what print would produce, using the same settings, and return page images without using paper. Use it to check layout, frames or watermark first.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssNoExtra CSS for text, markdown or html
dpiNoOverrides the resolution chosen by quality
fontNoBody font for text and markdown. Default handles Thai and English
n_upNoPages per sheet
alignNo
colorNoauto (default) sends pages with no color as gray, saving color ink. black_white is pure 1-bit look
gammaNo1 = unchanged
pagesNoe.g. "1-3,5,last", "-2" (second to last), "10-8" (reversed)
paperNoA4, A5, A6, letter, legal, 4x6, 5x7, photo-l, DL, C5, or custom like "100x150mm", "4x6in". Default: what the printer has loaded.
scaleNofit (default) whole page; shrink only if too big; fill crop to cover; stretch ignore aspect; actual 100%
copiesNo
duplexNoTwo-sided: long = book, short = notepad
footerNoSame format as header, e.g. "|{page}/{pages}|"
formatNo
headerNoLeft|Center|Right. Tokens: {page} {pages} {date} {time} {name}
invertNo
mirrorNoHorizontal flip, for iron-on transfers
presetNoSaved settings: document, draft, eco, sharp_text, photo, photo_borderless, booklet_2up, handout_4up, poster_vivid, scan_cleanup, or your own
rotateNoExtra clockwise rotation
sourceNo
backendNoauto (default): direct network, else Windows driver
collateNotrue 1,2,3,1,2,3 (default). false 1,1,2,2,3,3
contentNo
printerNoName, id, IP or alias, partial match works. Omit: the server picks.
qualityNo
reverseNoPrint last page first
sharpenNo
wait_msNoExtra wait before capturing a web page
contrastNo-100 to 100
darknessNoInk density, -100 lighter to 100 darker
job_nameNo
page_setNo
passwordNoFor protected PDFs
save_dirNoKeep the PNG files here
border_mmNoThickness of a printed frame around the content
ink_saverNoPercent lighter overall
margin_mmNoBlank margin on all sides
max_pagesNoDefault 3
thresholdNoCutoff for black_white, default 128
watermarkNoText across each sheet
borderlessNoEdge to edge, if the printer supports it
brightnessNo-100 to 100
javascriptNoRun page scripts. Default: on for URLs and html files, off for inline content
paper_typeNoplain, inkjet, photo, glossy, or a printer keyword
saturationNo-100 gray to 100 vivid
line_heightNo
n_up_gap_mmNoGap between pages on a sheet
orientationNo
preview_dpiNoDefault 70
border_colorNo#rrggbb or a name: black, red, blue, gray...
border_styleNo
font_size_ptNo
line_numbersNoFor text sources
overlay_fontNoFont for header, footer, watermark
paper_sourceNoTray: auto, main, manual, or a name from printer_status
allow_networkNoFetch remote resources. Same defaults as javascript
border_gap_mmNoSpace between frame and content
margin_top_mmNoTop margin
overlay_colorNo
scale_percentNoExact zoom, overrides scale
cell_border_mmNoFrame around each page in n-up
margin_left_mmNoLeft margin
margin_right_mmNoRight margin
overlay_size_ptNo
watermark_angleNoDefault -45
watermark_colorNo
margin_bottom_mmNoBottom margin
print_backgroundNoWeb page backgrounds, default true
watermark_opacityNoPercent, default 15
watermark_size_ptNo
allow_private_networkNoRequired to print a URL on this LAN or PC (router, intranet, localhost) or a \\server\share path. Off by default so a page or link cannot reach internal systems

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior3/5

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

The readOnlyHint annotation already declares this is a non-mutating operation, and the description reinforces that with 'without using paper'. It adds that the settings mirror print exactly and that pages come back as images, but says nothing about the response shape (paths vs. inline images), where files land (save_dir), or that only a limited number of pages is rendered by default (max_pages defaults to 3). With annotations covering safety, this is adequate but not rich.

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 sentences, front-loaded with the core distinction (same output, no paper) followed by the usage cue. Nothing is redundant or padded.

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

Completeness2/5

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

For a tool with 71 parameters, no output schema, and no annotations beyond readOnlyHint, the description is thin. The most consequential facts an agent needs are missing: that only max_pages (default 3) sheets are rendered so long documents are only partly previewed, and what the return value actually contains (image data vs. files written to save_dir).

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 75%, near the high band, so the schema does most of the documenting work with 71 well-annotated parameters including enums and defaults. The description mentions 'same settings' generically but calls out no parameter by name or explains preview-specific behavior such as preview_dpi, save_dir, or max_pages. This is a baseline 3.

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 gives a specific verb and resource ('Render ... return page images') and explicitly distinguishes itself from the printing sibling: it produces exactly what print would, but 'without using paper'. An agent can tell immediately that this is the non-committal dry run of print.

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 states when to use it: 'to check layout, frames or watermark first', which implies the pre-print verification workflow. What it does not state is when not to use it (e.g., that a preview is unnecessary for trivial jobs) or name an alternative explicitly, so it stops short of a full 5.

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