Skip to main content
Glama
playwright-ui-mcp

playwright-ui-mcp

by ailabs-393

browser_screenshot

Capture a screenshot of the current page or a specific element to analyze UI layout and visual state. Returns base64 image data for inspection and verification.

Instructions

Take a screenshot of the current page for UI analysis. Returns the screenshot as base64-encoded image data that can be analyzed.

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": {
      "pageId": "<pageId>"
    },
    "name": "browser_screenshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdYesThe page ID to screenshot
fullPageNoCapture full scrollable page (default: false)
selectorNoCSS selector to screenshot a specific element

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden. It does disclose the return form ('base64-encoded image data'), which is genuinely useful, but says nothing about failure modes (missing pageId, invalid selector) or whether the default viewport versus full-page behavior matters. It also doesn't confirm the operation is non-destructive.

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?

Two sentences, action front-loaded, with the return format following immediately. Nothing is redundant or padded.

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?

Reasonable for a simple 3-parameter tool with no output schema, since the return format is explained. However, with zero annotations and no output schema, it should cover prerequisites and side effects (capture-only, requires a live page) more explicitly.

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 pageId, fullPage, and selector are already documented with defaults. The description adds only the return-format context and no extra meaning about how fullPage and selector interact or which takes precedence.

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: 'take a screenshot of the current page'. This clearly distinguishes it from content-reading siblings like browser_get_content or browser_get_visible_elements, though it never names an alternative explicitly.

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

Usage Guidelines3/5

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

'for UI analysis' is the only usage hint, implying visual verification rather than DOM inspection. There is no guidance on when to prefer this over browser_get_visible_elements or browser_get_content, and no prerequisites (such as requiring an open page/browser_launch) are mentioned.

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