Web preview tool (webpreview)

Overview

webpreview refreshes a user-facing, mobile-proportioned screenshot of a web URL. The latest image appears as a reduced image between the chat scroll and the message textbox; the AI can trigger a refresh, but the screenshot is not returned to the AI for visual analysis.

Usage

The AI can show or reload a preview by invoking the tool with the current URL:

{
  "name": "webpreview",
  "arguments": {
    "url": "https://example.com/landing"
  }
}

To capture at a different size, add a viewport argument — a preset id ("phone", "phone+", "tablet", "laptop") or a "WIDTHxHEIGHT" string (e.g. "1280x800"). It defaults to the 375 × 667 "phone" capture:

{
  "name": "webpreview",
  "arguments": {
    "url": "https://example.com/landing",
    "viewport": "tablet"
  }
}

In the chat UI

Authorization

webpreview uses the project's tool authorization mode (Ask, Allow, or Off) and optional URL allowlist patterns. In Ask mode, changing the resolution closes the viewer and shows the standard authorization card in the chat; approving it retries the capture at the selected size.