| name | chrome-devtools |
| description | Use when the user asks to "take a screenshot of a website", "navigate to a URL", "fill a form in the browser", "interact with Chrome", or when a chrome automation task is needed. |
| user-invocable | true |
Prerequisites
Chrome must have remote debugging enabled:
- Open Chrome
- Go to
chrome://inspect/#remote-debugging
- Enable the remote debugging server
The CLI auto-connects by reading Chrome's DevToolsActivePort file โ no WebSocket URL needed.
Core Capabilities
- Navigation:
navigate, back, forward, reload.
- Emulation:
emulate (viewport, mobile, device-scale-factor, geolocation).
- Extraction:
screenshot, snapshot (accessibility tree), list-pages.
- Interaction:
click, click-at, fill, type-text, press-key, hover.
- Execution:
evaluate (JS), execute-3p-tool.
- Synchronization:
wait-for (text on page).
Usage Guide
Page Selection
Most commands require a page target. Use --page <index> (0-based) or --target <id>.
chrome-devtools list-pages
chrome-devtools --target main navigate https://example.com
Emulation (Viewport & Geolocation)
Overrides are persistent per page. You can set them standalone or during navigation.
chrome-devtools --target main emulate --viewport 1920x1080 --geolocation 40.71,-74.00
chrome-devtools --target main emulate --viewport 375x812 --mobile --device-scale-factor 3
chrome-devtools navigate https://geotargetly.com --geolocation 51.50,-0.12
chrome-devtools navigate https://example.com --viewport 375x812 --mobile
chrome-devtools new-page https://example.com --viewport 375x812
chrome-devtools --target main emulate --clear-all
chrome-devtools --target main emulate --clear-viewport
chrome-devtools --target main emulate --clear-geolocation
Interaction Patterns
chrome-devtools fill "input.search" "Rust programming"
chrome-devtools press-key Enter
chrome-devtools wait-for "The Rust Programming Language"
chrome-devtools screenshot --full-page --output search_results.png
Advanced Evaluation
chrome-devtools evaluate "document.title"
chrome-devtools evaluate "alert('hi')" --dialog-action accept
Command Reference
Navigation
chrome-devtools navigate <url> [--viewport WxH] [--mobile] [--device-scale-factor N] [--geolocation lat,lon] [--accuracy M]
chrome-devtools navigate <url> --extra-headers '{"Authorization":"Bearer ..."}'
chrome-devtools navigate <url> -o /tmp/result.txt
chrome-devtools navigate --back
chrome-devtools navigate --forward
chrome-devtools navigate --reload
chrome-devtools new-page <url> [--viewport WxH] [--mobile] [--device-scale-factor N] [--geolocation lat,lon]
chrome-devtools new-page <url> --extra-headers '{"X-Debug":"1"}'
chrome-devtools close-page [id_or_index]
chrome-devtools select-page [id_or_index]
Emulation
chrome-devtools emulate [--viewport WxH] [--mobile] [--device-scale-factor N] [--geolocation lat,lon] [--accuracy M]
chrome-devtools emulate --clear-all
chrome-devtools emulate --clear-viewport
chrome-devtools emulate --clear-geolocation
Utilities
chrome-devtools --target <name> wait-for "Success" --timeout 10000
chrome-devtools list-pages
Third-party Developer Tools
chrome-devtools list-3p-tools
chrome-devtools execute-3p-tool <name> '<json-params>'