Skip to main content
Glama

compare_viewports

Capture mobile, tablet, and desktop screenshots to detect layout shifts and compare pixel differences across responsive views.

Instructions

Capture screenshots of a webpage across mobile (375px), tablet (768px), and desktop (1440px) viewports, identify structural layout shifts, and compute visual pixel diff analysis.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "compare_viewports"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoURL to compare. Defaults to currently opened page.
viewportsNoOptional custom viewports to compare.
run_pixel_diffNoGenerate visual pixel difference images (default: true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that three viewports are captured by default and that two kinds of analysis (structural layout shift and pixel diff) are produced, but says nothing about whether the page is navigated/reloaded, how expensive the operation is, or what the returned result looks like.

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?

A single front-loaded sentence that lists the capture step first, then the analyses, with no filler or redundancy. Every clause corresponds to a real capability of the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a multi-step, multi-viewport operation with no output schema and no annotations, so the description should say more about the shape of the layout-shift and pixel-diff results. It covers what happens but not what comes back, leaving a meaningful gap for a tool of this complexity.

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 baseline is 3. The description does add one piece of meaning the schema lacks — the default viewport set (mobile 375px, tablet 768px, desktop 1440px) that applies when the 'viewports' array is omitted — but it says nothing about 'url' defaulting to the open page or the effect of run_pixel_diff.

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?

The description names a specific verb and resource ('Capture screenshots of a webpage') and enumerates the exact viewports (375px/768px/1440px) plus two downstream analyses (layout shift detection, pixel diff). That makes the tool's job unambiguous, though it never names or contrasts with close siblings like capture_screenshot, test_responsiveness, or audit_layout.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, and no mention of the obvious alternatives (test_responsiveness for behavior testing, capture_screenshot for a single capture, audit_layout for layout auditing). The use case is inferable from the described outputs but the agent is left to guess when this is the right call.

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