Skip to main content
Glama

maket_pdf

Export a document to PDF for sharing or print: renders every page at true size, inlines styles, and writes the file to the exports directory. Choose screen, print, or HD quality.

Instructions

When to use: export a document to PDF for sharing or print. One call renders every page in order. For a single-page raster (PNG), use maket_preview snapshot instead.

Renders every page via headless Chromium at the canvas's true mm size, then writes to EXPORTS_DIR/.pdf. Charte CSS is inlined so fonts and tokens render identically to the live preview. The result lists, by number and name, every page whose PDF rendering differs from its preview (element boxes, fonts, colours). quality — screen (96 DPI, smallest), print (150 DPI, default), hd (300 DPI). rows — collection-bound pages: preview (default, follows the page cursor), current (cursor row only), all (one page per row), template (raw placeholders). Check the cursor first with maket_collection action=cursor.

Input Schema

NameRequiredDescriptionDefault
docYesDocument name.
rowsNoFor pages bound to a collection: preview (default) follows each page's cursor — what the live canvas shows; current = the cursor's row only; all = one page per row (mail merge); template = raw placeholders.
qualityNoDPI preset: screen=96, print=150 (default), hd=300.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.4.5
    • addedInput schema / properties / rows
      Added value: +{
      +  "description": "For pages bound to a collection: preview (default) follows each page's cursor — what the live canvas shows; current = the cursor's row only; all = one page per row (mail merge); template = raw placeholders.",
      +  "enum": [
      +    "preview",
      +    "current",
      +    "all",
      +    "template"
      +  ],
      +  "type": "string"
      +}
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the rendering engine (headless Chromium), the true mm rendering size, the exact write destination (EXPORTS_DIR/<doc>.pdf), the CSS inlining behavior that guarantees fidelity, and what the result reports (pages whose rendering differs from preview). That is unusually complete for a mutation/export tool.

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-loads the usage decision, then behaviors, then parameter notes — a sensible hierarchy with no wasted preamble. It is somewhat long, and the quality/rows lines duplicate what the schema already says, so it falls short of a crisp 5.

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 three straightforward parameters, no output schema, and no annotations, the description covers everything an agent needs: purpose, alternative, side effects, output location, and even a summary of the return content. Nothing material is missing.

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%, so the schema already documents all three parameters and both enums. The description largely restates the enum semantics (quality DPI presets, rows preview/current/all/template) rather than adding new meaning, though the cursor cross-reference is a small value-add. 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?

The description opens with a specific verb and resource ("export a document to PDF for sharing or print") and immediately distinguishes itself from the sibling maket_preview by naming the alternative for raster output. An agent can route between maket_pdf and maket_preview without opening either schema.

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" framing plus an explicit when-not: "For a single-page raster (PNG), use maket_preview snapshot instead." It also supplies a prerequisite workflow hint for collection-bound pages ("Check the cursor first with maket_collection action=cursor").

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