Skip to main content
Glama

html_to_pdf

Read-only

Convert HTML content to PDF using Prince.

Args:
    content: HTML content to convert
    style: Additional CSS to apply (inline stylesheet content)
    page_size: Page size (e.g., A4, letter)
    page_margin: Page margins (e.g., 20mm)
    javascript: Enable JavaScript execution
    pdf_profile: PDF profile (e.g., PDF/A-3b, PDF/UA-1)
    output_filename: Output filename for the PDF (default: "output.pdf")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
styleNo
contentYes
page_sizeNo
javascriptNo
page_marginNo
pdf_profileNo
output_filenameNo

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already cover safety hints (readOnly, destructive). The description adds engine detail (Prince) and default filename, but does not disclose return value or file output behavior. While output_filename suggests file creation, readOnlyHint=true is not directly contradicted, so no contradiction is flagged.

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?

The description is front-loaded with a one-line purpose followed by a structured Args list. Every line contributes value, with no redundancy or filler.

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

Completeness3/5

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

Given 7 parameters, no output schema, and only base annotations, the description should explain return behavior and side effects. It does not mention where the PDF is written or what is returned. It also lacks notes on limitations or integration with sibling tools, leaving noticeable gaps.

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 descriptions are absent (0% coverage), so the description must compensate. It explains all parameters with concise purposes, examples for page_size and page_margin, and default for output_filename. However, values for pdf_profile and page_size are not fully enumerated.

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 clearly states 'Convert HTML content to PDF using Prince', specifying both input and output, and naming the engine. This distinguishes it from siblings like markdown_to_pdf and url_to_pdf.

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?

The description implies use when HTML content needs conversion to PDF, but does not explicitly mention alternatives or when-not-to-use scenarios. Context is clear but exclusions are absent.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinctly different input source: HTML content, Markdown content, and a URL. There is no overlap in purpose, making selection unambiguous.

Naming Consistency5/5

All tool names follow the exact same verb_noun pattern: html_to_pdf, markdown_to_pdf, url_to_pdf. This is perfectly consistent and predictable.

Tool Count5/5

With only 3 tools, the server is tightly scoped to its core function of PDF conversion from three common input types. Each tool earns its place.

Completeness4/5

The set covers the most common conversion inputs (HTML, Markdown, URL). A minor gap is lack of direct file input, but these three cover the majority of use cases.

Resources