Skip to main content
Glama

Create a PDF from HTML

apitemplate_create_pdf_from_html

WRITE: renders one PDF from HTML (Jinja2 placeholders like {{name}} are filled from data), without a saved template, and returns the hosted download_url (never the file bytes). COST: uses 1 generation of your APITemplate.io plan quota per call (see apitemplate_get_account). Do not retry or repeat it unless needed; every call is counted. POST /v2/create-pdf-from-html (export_type=json).

Input Schema

NameRequiredDescriptionDefault
cssNoCSS including the <style> tag.
bodyYesHTML body; may use Jinja2 syntax such as {{name}}.
dataNoValues for the placeholders in body, e.g. {"name":"Jo"}.
metaNoYour own reference id for this file; it shows up in apitemplate_list_objects.
filenameNoCustom file name ending in .pdf (default: a random UUID).
settingsNoPDF print settings.
expirationNoMinutes until the hosted file expires: 0 = keep permanently (default), or 1-10080.
generation_delayNoMilliseconds to wait before rendering (0-30000), for pages that load content late.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly=false, idempotent=false and openWorld=true, and the description adds genuinely new behavioral context on top: it discloses the return contract ("returns the hosted download_url (never the file bytes)"), the per-call quota cost, and an explicit non-idempotency warning against retrying. That is exactly the kind of cost/side-effect detail annotations cannot convey.

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?

Three sentences with explicit WRITE and COST prefixes front-load the operation type, the return contract, and the quota impact before the endpoint reference. Every clause carries information an agent needs; there is no filler.

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 8 parameters, a nested settings object and no output schema, the description compensates by stating the return value (hosted URL, not bytes), the quota cost, and the non-idempotency caveat. Combined with full schema coverage on all parameters, an agent has everything needed to invoke this correctly.

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 description coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema cannot: it explains that Jinja2 placeholders in body are resolved from data, tying two separate fields together semantically. It adds nothing about css, settings, naming, or expiration beyond what the schema documents.

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 ("renders one PDF from HTML") and immediately scopes it against siblings by stating "without a saved template", which separates it from apitemplate_create_pdf and apitemplate_create_pdf_from_markdown. It also names the exact endpoint (POST /v2/create-pdf-from-html), so an agent can distinguish it from create_pdf_from_url without opening any 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 clear usage context: this is a WRITE operation costing one quota generation, and it directs the agent to apitemplate_get_account for quota checks and warns against retrying. It does not name the sibling alternatives explicitly (e.g. when to prefer create_pdf_from_url over raw HTML), so the routing guidance is implied through "without a saved template" rather than stated.

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.