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

Improve error handling in navigate_page_history tool

Open mithun50 opened this issue 1 year ago • 2 comments

The navigate_page_history tool in src/tools/pages.ts currently suppresses specific errors when a navigation action (back or forward) fails. Instead of providing context about why the navigation failed (e.g., no page in history), it returns a generic message: Unable to navigate {back|forward} in currently selected page..

This should be improved to check the navigation history before attempting the action. If the navigation is not possible, a more informative error message should be returned to the user, such as "Cannot go back, no previous page in history." This will improve the tool's usability and provide better feedback.

mithun50 avatar Oct 02 '25 13:10 mithun50

If you guys assign this issue I can work on this issue

mithun50 avatar Oct 02 '25 13:10 mithun50

In what scenarios, with what prompts would you use this?

natorion avatar Oct 09 '25 06:10 natorion