Skip to main content
Glama
jakobautomation

agentsvc-mcp

html_to_pdf

Generate a PDF from a public URL or raw HTML, with page size, orientation, and margin settings for invoices, reports, and printable documents.

Instructions

HTML to PDF — Render a URL or raw HTML string to PDF. Returns pdf_base64 (base64 PDF; decode to get raw bytes) and page_count. Provide url OR html, never both. Supports format (A4/Letter/Legal), landscape boolean, and margin settings (top/bottom/left/right in CSS units). Use for invoices, reports, or printable document generation. Cost: $0.0045 USDC per call. Latency p99: 3500ms.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses return shape (pdf_base64 decoded to bytes, page_count), mutual exclusivity of inputs, cost ($0.0045 USDC/call), and p99 latency (3500ms). It omits auth requirements, error behavior, and rate limits, so not exhaustive, but strong behavioral context for a paid 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-loaded with purpose and return shape, then constraints, parameters, use cases, and operational cost/latency. Dense but every clause carries information; minor redundancy with the schema's parameter docs.

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

Completeness4/5

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

No output schema exists, so the description usefully explains return values (pdf_base64, page_count). Between this and the 100%-covered input schema, an agent has enough to invoke correctly; only ambient concerns like auth and failure modes are absent.

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 description coverage is 100%, so the schema already documents url/html, format enum, landscape, and margin units. The description largely restates these; it adds no syntax or edge-case guidance beyond the schema. Baseline 3 is appropriate.

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+resource ('Render a URL or raw HTML string to PDF') and immediately scopes what it accepts. It is easily distinguished from sibling rendering/conversion tools like screenshot, doc_convert, chart_render, and pdf_extract.

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?

Gives clear use cases ('invoices, reports, or printable document generation') and an explicit constraint ('Provide url OR html, never both'). It does not name which sibling to prefer for adjacent tasks (doc_convert, screenshot), so it stops short of full when/when-not routing, but the context is solid.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools