Skip to main content
Glama

Render to PDF: HTML, Markdown or a web page to a print-ready PDF (Korean fonts included)

render_pdf

Use when an agent must hand over a document as a PDF (report, invoice, summary, receipt). Input: GET ?url= for a public page, or POST JSON {html | markdown | url, format A4|Letter, landscape, margin_mm}. Markdown gets a clean stylesheet with Korean fonts. Output: JSON fileBase64 (decode to the PDF), bytes, page settings. Headless Chrome on Cloudflare. Bad input or daily cap refused before payment. Example: ?url=https://example.com/ Price: $0.01 USDC (Base or Solana) via x402.

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) page to render (GET). For html/markdown use POST JSON.
htmlNoHTML to render (MCP argument or POST JSON; alternative to url/markdown)
formatNoPage size (default A4)
markdownNoMarkdown to render (MCP argument or POST JSON; alternative to url/html)
landscapeNo1 = landscape
margin_mmNoPage margin in mm (default 12)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations at all, the description carries the full burden and does so: it discloses the payment model ($0.01 USDC via x402 on Base or Solana), that bad input or the daily cap is refused before payment, the execution engine (headless Chrome on Cloudflare), and the exact output shape (JSON fileBase64 to decode, bytes, page settings). That is precisely the behavioral context an agent needs before committing a paid call.

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 when-to-use clause, then input, output, engine, error and price in six tight sentences — no filler. The telegraphic shorthand ('Input: GET ?url=', 'Price: $0.01 USDC') trades some readability for density.

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

Completeness4/5

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

For a 6-param tool with no annotations and no output schema, the description covers the return payload (fileBase64, bytes, page settings), the payment and refusal behavior, and the rendering backend. Gaps are minor: no mention of render timeouts, JS/pagination handling, or max input size.

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 100%, so baseline is 3, but the description adds real value beyond it: it supplies the format values A4|Letter that the schema's enum-less 'Page size' field lacks, explains the GET-vs-POST split for url/html/markdown, and shows a concrete usage example. Margin units and landscape semantics are left to the schema.

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 concrete verb and resource (render HTML, Markdown, or a public page to a print-ready PDF) and enumerates the artifact types it serves (report, invoice, summary, receipt). It reads clearly distinct from sibling render_png and from the conversion siblings like convert_to_markdown.

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?

The opening 'Use when an agent must hand over a document as a PDF' gives an explicit trigger, and the input section clarifies which mode to choose (GET ?url= for public pages, POST JSON for html/markdown). It stops short of naming alternatives such as render_png or convert_to_markdown or stating when not to use it.

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