Skip to main content
Glama

Render HTML to an image

screenshot_html

Render an HTML document to an image for social cards, charts, or email previews. Returns a hosted image URL and the image when 2 MB or smaller.

Instructions

Render an HTML document (inline CSS/JS allowed, public http(s) assets only) to an image — e.g. social cards, charts, email previews. Returns the hosted image URL and the image itself when it is 2 MB or smaller.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesComplete HTML document or fragment to render
formatNoImage format. Default png
adblockNoBlock ads
wait_msNoExtra wait before capturing, in ms
selectorNoCSS selector of a single element to capture
full_pageNoCapture the whole scrollable page. Default true
light_modeNoForce light or dark color scheme
viewport_widthNoViewport width in pixels. Default 1920
viewport_heightNoViewport height in pixels. Default 1080
block_cookie_bannerNoHide cookie consent banners
device_scale_factorNo1 = standard, 2 = retina, 3 = high-dpi
transparent_backgroundNoTransparent background (PNG/WebP only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose two meaningful traits: only public http(s) assets are fetched (no local/private resources), and the inline preview image is returned only when it is 2 MB or smaller while the hosted URL is always returned. Auth requirements, rate limits, and timeout behaviour remain undisclosed.

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?

Two front-loaded sentences: capability plus content constraints first, return behaviour second. Zero filler and no restatement of the title.

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 12-parameter rendering tool with no output schema, the description covers the essential unknowns: what input is accepted, what external resources resolve, and what the caller receives (hosted URL plus conditional inline image). Remaining parameter detail is fully carried by the schema, so nothing critical 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 description coverage is 100%, so the baseline is 3, but the description adds semantics the schema doesn't: inline CSS/JS is executed and external assets must be publicly reachable http(s) URLs, which directly qualifies how the required 'html' parameter is handled. It adds no per-parameter overrides for format, selector, wait_ms, etc.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Render an HTML document ... to an image') plus concrete artefact types (social cards, charts, email previews). It implicitly separates itself from screenshot_url by taking HTML source rather than a URL, but never names the sibling, so differentiation is left to inference.

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 example outputs (social cards, charts, email previews) give clear context for when this tool fits, and the '(inline CSS/JS allowed, public http(s) assets only)' constraint pre-empts a wrong invocation. It does not state when to prefer screenshot_url or generate_pdf instead, so there are no exclusions.

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