Skip to main content
Glama

Compare rendering between two engines

visual_compare

Compare the same page in two browser engines to identify layout differences, classify root causes, and filter out non-actionable noise.

Instructions

Renders the same page in two engines (default chromium vs webkit) and reports where they differ. Two kinds of evidence: layout divergence per element (size, line count, position) and findings that exist in only one engine. Native controls and monospace metrics are counted but not listed unless you pass includeNoise:true — they differ in every engine and are not actionable. Divergences are classified so you are not buried in consequences: "root" = the element whose size or wrapping changed with no changed descendant (the likely cause), "propagated" = changed because a descendant changed, "shifted" = position only, mostly the vertical cascade (summarised, not listed), "missing" = present in one engine only. This is the most expensive tool: it runs a full audit twice.

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": "visual_compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute URL, path relative to baseUrl, or local HTML file path.
modeNoApplied to both runs. Default fast.
rulesNoRestrict the rule set. Omit for everything.
targetNoEngine you want to catch differences in. Default webkit.
baselineNoEngine you develop against. Default chromium.
conditionsNoApplied to both runs. Keep it to default unless you need more.
thresholdPxNoMinimum size/position delta to report. Default 2px. Lower catches subpixel drift, and more noise.
includeNoiseNoAlso list font-metric and native-control divergences. Default false: they are real but never actionable, and they outnumber actual layout bugs. The summary always reports their counts.
maxDivergencesNoCap on layout divergences. Default 40.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.3

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does so substantively: it discloses the two evidence classes, the root/propagated/shifted/missing classification, that shifted cascade items are summarised rather than listed, and that noise items are counted but suppressed by default. It omits side-effect details such as whether the page is fetched over the network or whether any state is written, which keeps it from a 5.

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?

Purpose and defaults are front-loaded, then the evidence model, then the classification scheme, then the cost caveat — a sensible order. It is dense and a few clauses (repeating default engines already in the schema) could be cut, but almost every sentence earns its place.

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?

With nine parameters, no output schema and no annotations, the description steps up by explaining what the report contains and how divergences are grouped, which is what an agent needs to interpret results. It leaves some gaps around network/auth preconditions and how rules or conditions affect the two runs.

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 coverage is 100%, so the schema already documents all nine parameters, and the description's parameter content (includeNoise:true, default engines) largely restates it. The classification vocabulary adds interpretive value but not parameter-level meaning, so the baseline 3 is right.

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?

States a concrete verb and resource — renders the same page in two engines and reports differences — with the default engine pair named inline. The closing note that it 'runs a full audit twice' implicitly distinguishes it from the single-run audit sibling, so an agent can tell why it exists and roughly how it relates to the other audit tools.

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 explicit cost framing ('This is the most expensive tool: it runs a full audit twice') gives clear usage context: reach for it deliberately, not casually. It does not name an alternative tool or state a hard when-not condition, so it falls short of a 5, but the guidance is well beyond implied.

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