Skip to main content
Glama
pm990320

ultimate-playwright-mcp

by pm990320

browser_screenshot

Take a screenshot of the current page, a specific element by CSS selector or snapshot reference, or the full scrollable page. Supports PNG/JPEG, quality control, resizing, and returns file path or base64.

Instructions

Take a screenshot of the current page or a specific element. By default saves to file and returns the path (saves context window tokens). Use ref to screenshot a specific element (from snapshot refs like e1, e2), or element for a CSS selector. Omit both for a full page screenshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetIdNoTarget ID of the tab (from browser_tabs). If not provided, uses first available tab.
refNoElement reference from snapshot (e.g., 'e1', 'e2') to screenshot a specific element.
elementNoCSS selector to screenshot a specific element (alternative to ref).
fullPageNoCapture the full scrollable page instead of just the viewport (default: false). Not compatible with ref/element.
typeNoImage format (default: png). Use jpeg for smaller file sizes.
qualityNoJPEG quality (1-100). Only applies when type is 'jpeg'. Default: 80. Lower values = smaller file size.
maxWidthNoMaximum width in pixels. Image will be scaled down proportionally if wider. Reduces base64 size for large/full-page screenshots.
returnAsNoHow to return the screenshot. 'file' (default) saves to disk and returns the file path — dramatically reduces context window usage. 'base64' returns inline image data (legacy behavior).
savePathNoCustom file path to save the screenshot to (only used when returnAs is 'file'). If not provided, saves to ~/.ultimate-playwright-mcp/screenshots/ with a timestamp filename.
Behavior4/5

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

Without annotations, the description effectively discloses key behaviors: saves to file by default to save tokens, supports element-specific or full-page capture, and allows base64 return. It does not mention potential performance impacts or that screenshots are read-only, which is acceptable.

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 with no waste. The first sentence states the purpose, the second provides parameter usage guidance. All necessary information is front-loaded.

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?

For a tool with 9 parameters and no output schema, the description covers core usage patterns and default behavior. It could mention return value details (path vs base64) but the schema already covers that. Adequate for agent decision-making.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds value by grouping parameters (ref/element as alternatives, fullPage mutually exclusive) and connecting ref to snapshot references. This context is not present in the schema alone.

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?

The description clearly states the tool takes a screenshot of the current page or a specific element. It distinguishes from sibling tools by detailing methods for element targeting (ref from snapshot, CSS selector) and full page capture.

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 description provides clear guidance on when to use each parameter (ref, element, omit for full page) and highlights the default file-saving behavior to reduce context usage. However, it does not explicitly compare to alternatives like browser_snapshot for DOM analysis.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pm990320/ultimate-playwright-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server