Repository navigation
Add --caps tool groups: vision, pdf, storage - #2
Merged
Merged
Conversation
The plan's opt-in groups, named and shaped as @playwright/mcp has them, listed only when --caps names them so the default list stays at 20 tools: - vision: browser_mouse_move_xy, _click_xy, _drag_xy, _down, _up and _wheel, by viewport coordinates of the top document. - pdf: browser_pdf_save, to a new temp file by default; a named file must be inside the working directory unless --allow-unrestricted-file-access is given. - storage: list, get, set, delete and clear for cookies, localStorage and sessionStorage of the current page. A cookie delete filtered by domain or path is refused when WebDriver would also delete a same-named cookie the filter spares. --caps network is refused with a note that routing comes later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by David · project thread
What does this PR do?
This adds the plan's opt-in tool groups to the MCP server. Names and arguments match
@playwright/mcp0.0.84. Each group is listed only when--capsnames it, so the default list stays at 20 tools.browser_mouse_move_xy,browser_mouse_click_xy,browser_mouse_drag_xy,browser_mouse_down,browser_mouse_upandbrowser_mouse_wheel. Coordinates are in the top document's viewport.browser_pdf_save. Without a name it writes a new file in the temp directory. A name must be inside the working directory unless--allow-unrestricted-file-accessis given.browser_cookie_*,browser_localstorage_*andbrowser_sessionstorage_*, each withlist,get,set,deleteandclear, for the current page.--caps networkis refused with a message saying request routing comes later. An unknown group name is refused too.Implementation notes
browser_cookie_deletefiltered by domain or path is refused when it would also delete a same-named cookie that the filter leaves out.about:blank,data:) then produce a clear error, whatever error the driver itself raises.user-select: none. Otherwise a double click selects text, and a drag starting on the selection becomes a native drag that loses the mouseup.This work was first written against SeleniumHQ/selenium before the move. It was moved over as-is after #1.
Testing
Locally:
npm run test:unit(75 passing),npm run test:e2eon Chrome (51 passing), andnpm run lint.AI assistance
Generated by Claude Code