Skip to content

feat: add fullPage parameter to browser_screenshot#152

Open
fgonnello-shopify wants to merge 1 commit intoBrowserMCP:mainfrom
fgonnello-shopify:feat/full-page-screenshot
Open

feat: add fullPage parameter to browser_screenshot#152
fgonnello-shopify wants to merge 1 commit intoBrowserMCP:mainfrom
fgonnello-shopify:feat/full-page-screenshot

Conversation

@fgonnello-shopify
Copy link

Summary

  • Playwright's page.screenshot() supports fullPage: true to capture the entire scrollable page, but BrowserMCP doesn't expose this option
  • Adds an optional fullPage boolean parameter to the browser_screenshot tool schema (defaults to false for backward compatibility)
  • Passes the parameter through to the browser extension via the browser_screenshot socket message

Motivation

Capturing entire scrollable pages currently requires manual scroll-and-stitch workflows. With this change, MCP clients can simply pass fullPage: true to get a full-page screenshot in one call.

Changes

  • src/tools/custom.ts: Extends the screenshot tool's argument schema with fullPage (optional boolean, defaults to false), parses it from params, and forwards it in the socket message payload

Test plan

  • fullPage omitted or false — behaves identically to current behavior (viewport-only screenshot)
  • fullPage: true — captures the full scrollable page
  • Existing MCP clients that don't pass fullPage continue to work without changes

Note: The browser extension side will also need to read this parameter and pass it to Playwright's page.screenshot({ fullPage }). This PR covers the MCP server side.

🤖 Generated with Claude Code

Playwright's page.screenshot() supports a fullPage option to capture the
entire scrollable page, but BrowserMCP doesn't expose it. This adds an
optional boolean parameter (defaults to false) to the screenshot tool's
schema and passes it through to the browser extension via the socket
message.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant