Skip to main content
Glama

capture_html

Render HTML with CSS into a screenshot for UI previews, email templates, or dashboard widgets. Sanitizes input and blocks external scripts for secure previews.

Instructions

Render arbitrary HTML as a screenshot with full CSS support. Use for custom UI previews, email templates, dashboard widgets, or any HTML/CSS content. Renders in a clean viewport with optional window chrome. Security: input is sanitized, external resources (scripts, iframes, external CSS) are blocked. Maximum input 200KB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesHTML content to render. External scripts, iframes, and external stylesheets are blocked for security. Inline styles and <style> tags work. Maximum 200KB.
titleNoDescription for logging and window title (if window chrome enabled).html
outputNoOutput filename (default: auto-generated as 'html-<timestamp>.png' or '.jpeg' based on SNAPMCP_FORMAT). Include extension to override format.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.3.4
    • changedInput schema / properties / html / description
      Previous value: -"HTML content to render"New value: +"HTML content to render. External scripts, iframes, and external stylesheets are blocked for security. Inline styles and <style> tags work. Maximum 200KB."
    • addedInput schema / properties / html / maxLength
      Added value: +200000
    • changedInput schema / properties / output / description
      Previous value: -"Output filename (default: auto-generated)"New value: +"Output filename (default: auto-generated as 'html-<timestamp>.png' or '.jpeg' based on SNAPMCP_FORMAT). Include extension to override format."
    • changedInput schema / properties / title / description
      Previous value: -"Description (for logging)"New value: +"Description for logging and window title (if window chrome enabled)."
    • addedInput schema / properties / title / maxLength
      Added value: +100
  2. First observedv2.3.2

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 for behavior disclosure dispusa. It clearly states sanitization, blocking of external resources, the 200KB maximum, and viewport/chrome rendering behavior. It does not describe the return value or failure modes, but it does cover the most important constraints for safe invocation.

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 four sentences with no wasted words: purpose, use cases, rendering context, and security constraints are each given one tight sentence. The most important information is front-loaded.

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?

For a simple 3-parameter tool with no output schema and no annotations, the description covers what the tool does, when to use it, and the key constraints needed to use it correctly. It could improve by pointing to alternatives like capture_browser for live pages, which is the only notable gap.

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 baseline is 3. The description repeats the 200KB limit and external-resource blocking already present in the schema but does not add meaningfully new parameter semantics. The 'optional window chrome' note is minor supporting context, not a substantive parameter clarification.

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 names a specific verb and object ('Render arbitrary HTML as a screenshot') and immediately clarifies the special value ('with full CSS support'). It also lists concrete use cases, distinguishing this from sibling capture_* tools that target Markdown, browser pages, or files.

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?

An explicit 'Use for' clause gives clear selection context: custom UI previews, email templates, dashboard widgets, and general HTML/CSS content. It does not name alternatives or state when not to use this tool, so it falls just short of a 5.

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