Skip to main content
Glama

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

render_pdf
Read-onlyIdempotent

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. Use instead: render_png for an image. Example: ?url=https://example.com/ Price: $0.01 per call, paid in USDC (Base, Monad, Polygon, Arbitrum or Solana) via x402.

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": "render_pdf"
  }
}

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. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  4. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and open-world, so the bar is lower, yet the description adds substantial context the annotations cannot: headless Chrome on Cloudflare as the renderer, a $0.01 per-call price, USDC payment over five named chains via x402, and a pre-payment refusal for bad input or the daily cap. The return shape (JSON with fileBase64 to decode, bytes, page settings) is also disclosed, which is important since no output schema exists.

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?

It is front-loaded with the trigger condition, then input modes, output, provider, failure behavior, alternative, example, and price in a tight sequence with no filler. The telegraphic fragments ('Headless Chrome on Cloudflare.', 'Use instead: render_png for an image.') are efficient but read as clipped notes rather than prose.

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 what comes back (JSON fileBase64 that must be decoded, byte count, page settings), and it covers the payment gate and failure-before-charge behavior. For a 6-parameter, zero-required rendering tool, nothing an agent needs to invoke it correctly is missing.

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 the baseline is 3, but the description adds transport semantics the schema only gestures at: url is a GET query, whereas html/markdown/url go in a POST JSON body. It also restates the enumerable values (format A4|Letter, landscape, margin_mm) in a single readable line, though it adds no new detail on defaults or margin units beyond 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?

The description opens with a specific verb and resource ('hand over a document as a PDF') and enumerates the three input modes (url, html, markdown) plus the artifact types (report, invoice, summary, receipt). It explicitly names the sibling render_png as the non-overlapping alternative, so an agent can distinguish the two without opening a schema.

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 gives a clear trigger condition ('Use when an agent must hand over a document as a PDF') with concrete examples, and it routes image needs to render_png via 'Use instead: render_png for an image.' It stops short of stating exclusions or prerequisites beyond that single alternative, so it falls just short of full when/when-not coverage.

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