Skip to main content
Glama
Playwright DevTools MCP Server

Playwright DevTools MCP Server

by ariangibson

debug_take_screenshot

Capture the current viewport or full page as a screenshot to visually debug web apps, with options for clipping, JPEG quality, and on-image annotations.

Instructions

Take a screenshot of the current viewport or full page for visual debugging

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": {
      "contextId": "<contextId>"
    },
    "name": "debug_take_screenshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
clipNoClip the screenshot to a specific region
formatNoScreenshot formatpng
qualityNoImage quality for JPEG (0-100, only applies to JPEG format)
fullPageNoCapture the full scrollable page instead of just the viewport
contextIdYesBrowser context ID from browser_launch
annotationsNoAdd visual annotations to the screenshot

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations at all, the description carries the full burden and does not meet it. It discloses the viewport-vs-full-page behavior but says nothing about what is returned (image bytes, a file path, base64?), whether the browser must be launched first, or cost/size implications. For a screenshot tool with no output schema, the return format is a material omission.

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?

A single, front-loaded sentence with no filler. It is appropriately short, though it is arguably too short to be fully useful rather than padded.

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

Completeness2/5

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

The tool has six parameters, a nested annotation object, and no annotations or output schema, so the description should do more. It never mentions the annotation-markup capability, the clip region, JPEG quality handling, or what the caller receives back, leaving significant gaps for a moderately complex tool.

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 description coverage is 100%, so every parameter including the nested clip and annotations objects is already documented, making 3 the baseline. The description's "viewport or full page" phrasing loosely mirrors the fullPage parameter but adds no syntax, defaults, or interaction details (e.g., clip vs fullPage 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") plus the capture scope ("current viewport or full page"). This clearly separates it from siblings like debug_get_dom_tree, debug_get_page_source, or debug_get_element_properties, though it never names them 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 visual debugging" implies the usage context, which is better than nothing. However, there is no explicit when-to-use vs when-not guidance (e.g., use the DOM tree or page source instead when text is sufficient) and no mention of the prerequisite browser context beyond what the schema already says.

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