Skip to main content
Glama

Rendlet PDF

HTML to PDF

html_to_pdf
Read-only

Use to produce a real, full-quality PDF from HTML (reports, receipts, letters). Inputs: "html" (required), "format" (A4|Letter|Legal|A3|A5), "landscape", "margin" (CSS length), "filename". Rendered by headless Chromium with JavaScript disabled; only data: URIs and public https assets load; Chinese text supported. Output: the PDF as an embedded base64 resource plus pages, bytes and remaining quota. Requires "Authorization: Bearer " (or "sandbox" for a watermarked 1-page trial, 5/day). Without a usable key it returns a 402 payment_required result with buy links. Cost: 1 document from your monthly plan (free key: 100/month), or 1 prepaid credit after the cap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesFull HTML document or fragment.
formatNoA4
marginNoCSS length, e.g. 12mm12mm
filenameNodocument.pdf
landscapeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/openWorldHint, so the description carries the behavioral load and does it well: headless Chromium rendering, JavaScript disabled, asset-loading restrictions, Chinese text support, base64 PDF + pages/bytes/quota in the output, sandbox watermarking with a 5/day cap, and a 402 payment_required failure mode with buy links. Note a mild tension: it fetches public https assets while openWorldHint=false, but the asset set is bounded by caller-supplied HTML, so this is not a clear contradiction.

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 dense sentences, front-loaded with purpose then inputs then runtime/auth/cost behavior; nothing is wasted. The auth-and-billing sentence is information-dense but each clause carries decision-relevant facts.

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?

With no output schema, the description still explains the return payload (embedded base64 PDF, pages, bytes, remaining quota) and covers auth prerequisites, sandbox mode, failure behavior, and per-call cost. An agent has everything needed to invoke it and interpret the result.

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 only 40%, but the description names every parameter — html (required), format with its enum values, landscape, margin as a CSS length, and filename — compensating for the missing schema descriptions. It adds meaning (paper sizes, CSS-length margins) beyond the bare schema, though it doesn't explain filename's role or margin units further.

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 specific verb+resource ('produce a real, full-quality PDF from HTML') with concrete examples (reports, receipts, letters). The word 'real, full-quality' implicitly contrasts with the sibling preview_pdf, but no sibling is named explicitly, so differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

'Use to produce...' plus auth/cost detail tells the agent the general context, but there is no guidance on when to choose this over render_template (template-driven rendering) or preview_pdf (draft preview), nor any when-not-to-use condition. Usage must be inferred from the sibling names.

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.

Resources