Compare replica against original
compare_replicaVerify a replica against the original by running a deterministic perceptual diff, then attribute the worst visual mismatches to specific elements and styles for actionable evidence.
Instructions
Use this when a replica exists and you need evidence-driven visual verification or a same-page noise-floor check. Avoid it when you have not implemented a replica yet. Run a deterministic perceptual diff and attribute the worst visual mismatches to elements and styles. Cost: heavy. Session: loads the original and comparison target. Does not write files. Possible follow-ups if evidence is still missing: inspect_component.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fullPage | No | Compare the full page instead of only the viewport. | |
| selfCheck | No | Compare the original with a second fresh load of itself; cannot be combined with a replica source. | |
| threshold | No | Difference threshold. YIQ mode normalizes this legacy 0–765 scale. | |
| timeoutMs | No | Navigation timeout in milliseconds. | |
| userAgent | No | Optional browser user-agent override. | |
| waitUntil | No | Page lifecycle event to await before extraction. | domcontentloaded |
| autoScroll | No | Scroll through the page before extraction to trigger lazy-rendered content. | |
| maxScrolls | No | Maximum viewport-sized scroll steps when autoScroll is enabled. | |
| replicaUrl | No | URL of the replica. Provide this or replicaPath. | |
| colorMetric | No | Perceptual YIQ by default; rgbSum exactly reproduces the v0.9 metric. | yiq |
| maxHeightPx | No | Cap on the compared page height. | |
| originalUrl | Yes | Absolute http:// or https:// URL of the original website. | |
| replicaPath | No | Absolute path to a local replica HTML file. Provide this or replicaUrl. | |
| alignSections | No | When page heights diverge, also compare paired top-level sections. | |
| viewportWidth | No | Browser viewport width in CSS pixels. | |
| viewportHeight | No | Browser viewport height in CSS pixels. | |
| attributeRegions | No | Attribute worst regions to elements on both pages and report computed-style deltas. | |
| ignoreAntialiasing | No | Exclude detected anti-aliased edge pixels from mismatch counts. | |
| allowPrivateNetwork | No | Allow localhost and private-network URLs. Enable only for trusted sites. | |
| allowPrivateReplica | No | Allow localhost/private replica URLs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Visual metrics; the diff is returned as MCP image content. | |
| guidance | Yes |