Skip to main content
Glama
webEmbedding

webEmbedding

by jongko54

clone_reference_url

Clone a live web page from a URL into an embeddable copy or self-contained offline HTML snapshot, then verify visual fidelity across desktop, tablet, and mobile screenshots.

Instructions

Clone a web page from its URL in one call. Use when the user asks to clone, copy, recreate, mirror, or make a page look exactly like a URL. Captures the live page in a real browser, reuses the original when it can be embedded, otherwise writes a self-contained offline HTML snapshot (inlined CSS, shadow DOM, localized fonts/images) or a rebuild, and self-verifies it against desktop/tablet/mobile screenshots. Returns the clone entrypoint, output directory, and fidelity scores.

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": {
      "url": "<url>"
    },
    "name": "clone_reference_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesPublic http(s) URL of the page to inspect, capture, or clone.
output_dirNoDirectory for the clone and its evidence; the offline copy is written to snapshot/index.html (serve it over HTTP).
capture_htmlNoCapture rendered HTML; with output_dir this also writes the offline snapshot.
license_textNoLicense or permission text that allows reusing the page, from the user or the site; informs the reuse/rebuild policy.
wait_secondsNoUpper bound in seconds for each browser readiness wait (load, network quiet, lazy-load scroll); capture continues as soon as the page settles.
user_data_dirNoPath to an existing Chrome profile directory, to capture a page behind a login the user owns. Omit for a clean session.
source_signalsNoExtra hints about the page's origin, e.g. ["framer", "spline", "export"]; merged with signals detected from the page.
viewport_widthNoPrimary browser viewport width in CSS pixels (default 1440).
exact_requestedNoTrue (default) when the user wants an exact, faithful clone; false when an approximate rebuild is acceptable.
timeout_secondsNoTimeout in seconds for the static HTTP fetch of the page.
viewport_heightNoPrimary browser viewport height in CSS pixels (default 1200).
capture_screenshotNoTake a full-page PNG screenshot (needed for visual verification).
storage_state_pathNoPath to a Playwright storage-state JSON (cookies, localStorage) to load before capture, for pages behind a login the user owns.
breakpoint_profilesNoExtra viewports to capture and verify: desktop (1440x1200), tablet (768x1024), mobile (390x844). Example: ["tablet", "mobile"].
include_runtime_traceNoLaunch a real browser for runtime capture (default true). False limits the result to static HTML inspection.
storage_state_output_pathNoPath to write the browser storage state after capture, so the session can be reused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.3.13
    • addedInput schema / properties / breakpoint_profiles / description
      Added value: +"Extra viewports to capture and verify: desktop (1440x1200), tablet (768x1024), mobile (390x844). Example: [\"tablet\", \"mobile\"]."
    • addedInput schema / properties / capture_html / description
      Added value: +"Capture rendered HTML; with output_dir this also writes the offline snapshot."
    • addedInput schema / properties / capture_screenshot / description
      Added value: +"Take a full-page PNG screenshot (needed for visual verification)."
    • addedInput schema / properties / exact_requested / description
      Added value: +"True (default) when the user wants an exact, faithful clone; false when an approximate rebuild is acceptable."
    • addedInput schema / properties / include_runtime_trace / description
      Added value: +"Launch a real browser for runtime capture (default true). False limits the result to static HTML inspection."
    • addedInput schema / properties / license_text / description
      Added value: +"License or permission text that allows reusing the page, from the user or the site; informs the reuse/rebuild policy."
    • addedInput schema / properties / output_dir / description
      Added value: +"Directory for the clone and its evidence; the offline copy is written to snapshot/index.html (serve it over HTTP)."
    • addedInput schema / properties / source_signals / description
      Added value: +"Extra hints about the page's origin, e.g. [\"framer\", \"spline\", \"export\"]; merged with signals detected from the page."
    • addedInput schema / properties / storage_state_output_path / description
      Added value: +"Path to write the browser storage state after capture, so the session can be reused."
    • addedInput schema / properties / storage_state_path / description
      Added value: +"Path to a Playwright storage-state JSON (cookies, localStorage) to load before capture, for pages behind a login the user owns."
    • addedInput schema / properties / timeout_seconds / description
      Added value: +"Timeout in seconds for the static HTTP fetch of the page."
    • addedInput schema / properties / url / description
      Added value: +"Public http(s) URL of the page to inspect, capture, or clone."
    • addedInput schema / properties / user_data_dir / description
      Added value: +"Path to an existing Chrome profile directory, to capture a page behind a login the user owns. Omit for a clean session."
    • addedInput schema / properties / viewport_height / description
      Added value: +"Primary browser viewport height in CSS pixels (default 1200)."
    • addedInput schema / properties / viewport_width / description
      Added value: +"Primary browser viewport width in CSS pixels (default 1440)."
    • addedInput schema / properties / wait_seconds / description
      Added value: +"Upper bound in seconds for each browser readiness wait (load, network quiet, lazy-load scroll); capture continues as soon as the page settles."
  2. First observedv0.3.12

TDQS

A4/5.0
Behavior4/5

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

The annotations only say this is a non-read-only, open-world, non-idempotent, non-destructive operation; the description adds real substance on top: it launches a live browser, prefers embedding the original, otherwise writes a self-contained offline snapshot or a rebuild, and self-verifies against desktop/tablet/mobile screenshots. That is meaningful disclosure of what the tool actually does and what artifacts it leaves behind. It omits cost/latency expectations and any caution about only cloning pages the user has rights to, which caps it at 4.

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, then trigger phrases, then behavior, then return values -- a sensible order with no filler sentences. The second sentence is long and packs several ideas (browser capture, reuse-vs-rebuild, snapshot contents, verification) into one clause chain, which costs some readability but no content is wasted.

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 16-parameter, no-output-schema tool, the description carries the important load: it tells the agent what comes back (clone entrypoint, output directory, fidelity scores) and how the snapshot is produced and validated. Given full schema coverage, the remaining uncovered items -- runtime cost, failure modes, and the permission caveat behind license_text -- are the only notable gaps.

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 the baseline is 3; the description still earns above that by explaining the decision the parameters feed into -- exact faithful clone versus approximate rebuild, and the reuse-versus-rebuild policy that license_text informs. It also connects the multi-viewport verification to the breakpoint/screenshot parameters, adding meaning beyond the schema's field-level text.

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 ('Clone a web page from its URL') and adds the scope qualifier 'in one call', which hints that this is the orchestrated path rather than the granular steps. It never names a specific sibling such as inspect_url or build_reproduction_bundle, so an agent must infer the boundary from the sibling list alone, which keeps it short of a 5.

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 strong positive triggers -- 'clone, copy, recreate, mirror, or make a page look exactly like a URL' -- which map well onto how users actually phrase the request. It provides no explicit when-not guidance or routing to alternatives (e.g., use inspect_url if you only want to look, or audit_reference_url to diagnose a past attempt), so the exclusion half of the guideline is missing.

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