fix(browser_eval): align tool args with Playwright MCP 0.0.75 schema (target fields + fill_form)#141
Merged
Merged
Conversation
@playwright/mcp 0.0.75 (current @latest) renamed the locator field across several tools, so the wrapper's old names fail upstream validation (InputValidationError): - browser_click / browser_type / browser_evaluate: ref -> target - browser_drag: startRef/endRef -> startTarget/endTarget Verified against the auto-generated tool docs in @playwright/mcp@0.0.75. Adds target/startTarget/endTarget inputs and forwards the new names, while keeping ref/startRef/endRef accepted as back-compat aliases (target = args.target ?? args.ref). Note: browser_fill_form's field-object shape also changed upstream but its exact schema could not be verified from the package, so it is intentionally left unchanged here. Refs #136
…0.75
Verified against the live @playwright/mcp@0.0.75 browser_fill_form schema
(via tools/list): each field is now
{ element?, target (req), name (req), type (req: textbox|checkbox|radio|
combobox|slider), value (req) }
replacing the old { selector, value }.
Update the user-facing schema and forward the new field names; accept
'selector' as a back-compat alias routed to 'target'
(target = f.target ?? f.selector). Completes the field-rename fix so
fill_form no longer fails upstream with InputValidationError.
feedthejim
approved these changes
Jun 1, 2026
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.
What
@playwright/mcp@0.0.75(current@latest, auto-installed by thebrowser_evalwrapper) renamed the locator field and changed thefill_formfield shape. The wrapper forwarded the old names, so calls failed upstream withInputValidationError.browser_clickreftargetbrowser_typereftargetbrowser_evaluatereftargetbrowser_dragstartRef/endRefstartTarget/endTargetbrowser_fill_form{ selector, value }{ element?, target, name, type, value }All names/shapes were verified against the live
@playwright/mcp@0.0.75server via an MCPtools/listintrospection (not just docs). Thefill_formfieldtypeis the enumtextbox | checkbox | radio | combobox | slider.How
click/type/evaluate/drag.fill_formfield schema to{ element?, target, name, type, value }and map it through.ref/startRef/endRefandfields[].selectoraccepted as back-compat aliases (target = args.target ?? args.ref,f.target ?? f.selector), so existing callers don't break.Verification
pnpm typecheck✅pnpm build✅pnpm test✅ (38/38)tools/listagainst@playwright/mcp@0.0.75Fixes #136