-
Notifications
You must be signed in to change notification settings - Fork 522
Description
Is your feature request related to a problem? Please describe.
I am unable to save off screenshots using the chrome-devtools-mcp server. Sometimes I also get too many token errors on tool results.
Describe the solution you'd like
Add a save to file optional parameter to tools that return images (take_screenshot) or large amounts of data (take_snapshot, evaluate_script) .
The mcp-chrome server (and several others) supports saving images as files using the asPng optional parameter.
From the mcp-chrome server:
{
name: TOOL_NAMES.BROWSER.SCREENSHOT,
description:
'Take a screenshot of the current page or a specific element(if you want to see the page, recommend to use chrome_get_web_content first)',
inputSchema: {
type: 'object',
properties: {
name: { type: 'string', description: 'Name for the screenshot, if saving as PNG' },
selector: { type: 'string', description: 'CSS selector for element to screenshot' },
width: { type: 'number', description: 'Width in pixels (default: 800)' },
height: { type: 'number', description: 'Height in pixels (default: 600)' },
storeBase64: {
type: 'boolean',
description:
'return screenshot in base64 format (default: false) if you want to see the page, recommend set this to be true',
},
fullPage: {
type: 'boolean',
description: 'Store screenshot of the entire page (default: true)',
},
savePng: {
type: 'boolean',
description:
'Save screenshot as PNG file (default: true),if you want to see the page, recommend set this to be false, and set storeBase64 to be true',
},
},
required: [],
},
},
Describe alternatives you've considered
Claude code can't (or won't) let me save the [Image] data returned from the tool call to take_screenshot...
Additional context
The mcp-chrome server (and others) also support returning images as base 64 content using the storeBase64 optional parameter.