Skip to main content
Glama
getscreenshot-mcp

getscreenshot-mcp

Official
by rasterwise

Render HTML

render_html
Read-only

Render an HTML string in a real browser and return a screenshot to check components, emails, or pages before deployment. Use it to inspect local HTML without hosting.

Instructions

Render an HTML string in a real browser and return a screenshot you can see. Use it to check a component, email or page you just wrote without deploying it, and to look at local work, since the capture service cannot reach localhost. The HTML is hosted at an unguessable temporary URL, captured like any page, deleted as soon as the capture returns, and the result has the same shape as capture_screenshot. Assets must be inlined or use absolute public URLs: relative paths and localhost URLs inside the HTML will not load unless the HTML sets to a public origin. The page runs in a sandbox without cookies or localStorage, so code that depends on them may render blank. Cookie-banner hiding is off for this tool, so the page renders exactly as written. Costs 1 screenshot of the monthly quota per call. Takes about 9-25 seconds. Do not put secrets in the HTML: the resulting image link is public to anyone who has it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "html": "<html>"
    },
    "name": "render_html"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesThe HTML document or fragment to render, at most 2 MB. Inline the CSS and JS it needs, or load them from absolute public URLs. Relative asset URLs only resolve if the HTML sets <base href>.
scaleNoDevice pixel ratio of the stored image: 1 (default), 2 (retina) or 3. Affects the file at screenshot_url; inline images are downscaled either way.
widthNoViewport width in CSS pixels. API default 1280. Ignored when device is set.
detailNoSize of the inline images. "standard": at most 1280 px wide, about 1,568 tokens per image. "high": at most 1920 px wide, about 4,784 tokens per image; use it only to read small text.standard
deviceNoDevice preset: sets the viewport and, for phones, a mobile user agent. Overrides width and height. iphone* and pixel* are phones, ipad* are tablets, the rest are fixed desktop sizes.
heightNoViewport height in CSS pixels. API default 800. Ignored when device is set.
returnNo"image_and_url" attaches the images. "url_only" returns just the link and sizes, for when you need the file but do not need to look at it (uses no image tokens).image_and_url
elementNoCSS selector of one element to capture, for example "#pricing" or "main .hero". Cheapest way to look at one part of a page. A selector that matches nothing makes the capture fail (and still uses quota).
wait_msNoExtra wait in milliseconds after load, before the capture. API default 2000. Raise it for late animations or client-side rendering.
full_pageNoCapture the whole scrollable page instead of just the viewport. Tall pages are returned as several image slices and cost more tokens.
max_slicesNoMaximum number of inline images. A tall capture is cut into slices from the top; slices beyond this are left out and reported as truncated. Slices are also left out if the inline images would exceed about 1.5 MB in total (4 MB at high detail).

Output Schema

NameRequiredDescriptionDefault
formatYesFormat of the stored file at screenshot_url.
imagesYesOne entry per inline image, in the same order as the image blocks.
originalYesPixel size of the stored image. Null if it could not be read.
warningsYesThings worth knowing about this result, for example an error status from the page.
truncatedYesTrue when images were requested and some slices were left out, because of max_slices or the inline size limit. Always false with return: "url_only", where no image is attached by request.
origin_urlYes
captured_atYesISO 8601 UTC time of the capture.
page_statusYesHTTP status the page answered with. 400 or above usually means an error page was captured.
total_slicesYesHow many slices the whole image needs at this detail level, whether or not they are attached. With return: "url_only" this is how many a normal call would produce.
screenshot_urlYesFull-resolution image. Public to anyone who has the link.
expires_in_daysYesStored files are deleted after this many days.
estimated_image_tokensYesApproximate total vision tokens of the inline images.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only mark this read-only, open-world, non-idempotent. The description adds substantive behavior the annotations do not: an unguessable temporary hosting URL deleted after capture, a sandbox without cookies or localStorage that can render pages blank, cookie-banner hiding disabled, a 9-25 second latency, a one-screenshot quota charge, and a privacy warning that the resulting image link is public.

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 use case, then constraints, then cost/latency, then the secrecy warning — a sensible ordering where each sentence carries information. It is dense rather than padded, though the <base href> guidance duplicates the html parameter description and could be stated once.

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?

With an output schema present, return-value shape needs no explanation, and the description still notes the result matches capture_screenshot. For an 11-parameter render tool, the remaining agent-critical facts — sandbox limits, asset resolution, quota cost, latency, and public-link exposure — are all covered.

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 coverage is 100%, so per-parameter docs already carry the baseline. The description adds cross-cutting meaning the schema cannot: relative asset paths and localhost URLs will not load unless a public <base href> is set, which is the most common failure mode for this tool.

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 opening sentence gives a specific verb and resource (render an HTML string in a real browser, return a screenshot) and immediately frames the distinguishing input — raw HTML rather than a live URL — which separates it from capture_screenshot. An agent can pick the right tool without opening the schema.

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?

It states concrete use cases: checking a component/email/page without deploying, and inspecting local work that the capture service cannot reach. The contrast with the deployed-URL sibling is implied by 'since the capture service cannot reach localhost' rather than stated as an explicit when-not rule, 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.