Skip to main content
Glama

FileToPDF

Convert HTML to PDF

convert_html

Render a raw HTML string to a PDF using Chromium, with optional CSS and layout options. Costs 1 credit on success. Returns the PDF as an embedded resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNoOptional CSS, injected into the document <head>.
htmlYesThe HTML markup to render.
pdfaNoPDF/A conformance level, e.g. "PDF/A-2b". (Pro/Scale/trial only.)
pdfuaNoProduce an accessible PDF/UA document.
scaleNoRender scale, 0.1–2.0.
landscapeNoRender in landscape orientation. (Pro/Scale/trial only.)
marginTopNoTop margin in inches.
save_pathNoOptional absolute path to also write the PDF to on disk.
marginLeftNoLeft margin in inches.
paperWidthNoPaper width in inches, or with a unit e.g. "210mm".
marginRightNoRight margin in inches.
paperHeightNoPaper height in inches.
marginBottomNoBottom margin in inches.
userPasswordNoPassword required to open the resulting PDF.
ownerPasswordNoOwner password controlling permissions on the resulting PDF.
printBackgroundNoPrint background graphics/colors.
nativePageRangesNoPage ranges to include, e.g. "1-3,5".
preferCssPageSizeNoUse the page size declared in CSS @page rules.

TDQS

A3.9/5.0
Behavior3/5

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

Annotations only have openWorldHint=true, so description carries burden. It adds credit cost and return format, but does not disclose side effects like file writing via save_path parameter or rendering environment details. Additional behavioral info is valuable but incomplete.

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 zero waste: action, optional options, cost, output. Front-loaded with purpose. Every sentence adds distinct value.

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 18 parameters and no output schema, description covers main action, input, output, and cost. Missing side effects (save_path file writing), rendering environment details (JavaScript execution), and timeouts. Adequate but not comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description groups parameters as 'optional CSS and layout options', adding minimal meaning beyond schema. No new constraints or format details provided.

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 uses strong verb 'Render' and specific resource 'raw HTML string', output 'PDF'. It clearly distinguishes from siblings: convert_file (likely file-based), convert_markdown (markdown input), and get_account (unrelated).

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 description states 'raw HTML string' implying file-based HTML should use convert_file, but no explicit when-not or alternative mention. Context is clear enough due to sibling tool names, but lacks direct exclusionary guidance.

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 distinct input source: convert_file handles files from URLs, convert_html deals with raw HTML strings, convert_markdown processes Markdown, and get_account manages account info. There is no overlap.

Naming Consistency5/5

All tools follow a clear verb_noun pattern (convert_file, convert_html, convert_markdown, get_account), with consistent verb choice and naming style.

Tool Count5/5

Four tools is well-scoped for the domain: three conversion methods covering common input formats and one account tool. No tool is superfluous or missing.

Completeness4/5

The set covers the main conversion workflows (file URL, HTML, Markdown) and account management. Minor gaps like direct file upload or advanced formatting options for file conversion exist but do not hinder core functionality.