Skip to main content
Glama

Sats4AI - Bitcoin-Powered AI Tools

convert_html_to_pdf

Convert HTML or Markdown to a pixel-perfect PDF. Returns JSON: { url } — a temporary download URL (valid ~1 hour). Great for generating invoices, reports, receipts, or formatted documents programmatically. Supports full HTML/CSS including tables, images (base64 or URL), and inline styles. For Markdown input, set format='markdown'. 50 sats per conversion. Use convert_file instead for converting existing files between formats (e.g., DOCX→PDF). Pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='convert_html_to_pdf'.

Input Schema

NameRequiredDescriptionDefault
htmlYesHTML or Markdown content to convert
formatNoInput format (default: html)html
paymentIdYesValid payment ID (must be paid)
resultKeyNoOptional. The resultKey from create_payment. Send it with the same arguments to get this result again after a timeout.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / resultKey
      Added value: +{
      +  "description": "Optional. The resultKey from create_payment. Send it with the same arguments to get this result again after a timeout.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With zero annotations the description carries the full burden and does: it discloses the return shape and its key limitation ({ url }, temporary, ~1 hour), the cost model (50 sats per conversion), the payment/auth model (Bitcoin Lightning, no API key or signup), and the required upstream create_payment call. This is unusually complete disclosure of cost, ephemerality, and auth prerequisites for a mutation-ish 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 core action and return value, then layers use cases, limits, cost, and prerequisite in a sensible order. Dense but every sentence carries operational information; the use-case enumeration ('invoices, reports, receipts') is the only mildly expendable clause.

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?

For a paid, prerequisite-gated conversion tool with no annotations and no output schema, the description covers return value, URL lifetime, cost, auth/payment path, capability limits (full HTML/CSS, tables, base64 or URL images, inline styles), and the alternative tool. Nothing needed to call 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 baseline is 3. The description still adds meaning beyond the schema by tying `format='markdown'` to a concrete behavior and by establishing that paymentId originates from create_payment with a specific toolName argument. It does not elaborate on resultKey semantics, but the schema already documents that.

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 specific verb and both resources ('Convert HTML or Markdown ... to a pixel-perfect PDF') and explicitly differentiates from the sibling convert_file, noting that one handles existing file formats like DOCX→PDF. An agent can route between the two 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?

Gives explicit when-to-use ('invoices, reports, receipts'), when-to-use-the-other-tool ('Use convert_file instead for converting existing files'), the Markdown switch ('set format=\'markdown\''), and the hard prerequisite ('Requires create_payment with toolName=\'convert_html_to_pdf\''). Nothing about invocation selection is left to inference.

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.