chrome-devtools-mcp icon indicating copy to clipboard operation
chrome-devtools-mcp copied to clipboard

Is it possible to call the zoom in/out function of chrome browser

Open stevenlee001 opened this issue 2 months ago • 3 comments

Is your feature request related to a problem? Please describe. I need to zoom out the current browser window to 80%, I can do it from chrome menu zoom manually, but cannot do it via MCP server prompt Describe the solution you'd like to do this by prompt directly, such as zoom out to 80%

Describe alternatives you've considered

I have tried similar prompt, it uses javascript document.body.style.zoom=80%, the result is not the same as chrome zoom out function, not good enough to fill in all my page content

Additional context Other alternatives should be good as well

stevenlee001 avatar Oct 11 '25 08:10 stevenlee001

This feature would also benefit WCAG testing for 1.4.4 Resize Text (if we can zoom to 200%) and 1.4.10 Reflow (if we can set the viewport to 320px * 256px (more info on official WCAG page or Eric Eggert wrote a nice post on it).

BogdanCerovac avatar Oct 13 '25 23:10 BogdanCerovac

Have you tried letting the agent use evaluate_script with document.body.style.zoom = 0.5;?

natorion avatar Oct 22 '25 16:10 natorion

Yes, I tried with 0.5, the result is a little bit better

stevenlee001 avatar Nov 03 '25 14:11 stevenlee001