Commit 5393d2d
authored
fix(browser_eval): align tool args with Playwright MCP 0.0.75 schema (target fields + fill_form) (#141)
* fix(browser_eval): map element refs to Playwright MCP 'target' fields
@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
* fix(browser_eval): update fill_form field shape for Playwright MCP 0.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.1 parent 3f9f406 commit 5393d2d
1 file changed
Lines changed: 59 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
55 | | - | |
56 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
57 | 78 | | |
58 | 79 | | |
59 | 80 | | |
| |||
72 | 93 | | |
73 | 94 | | |
74 | 95 | | |
75 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
76 | 101 | | |
77 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
78 | 107 | | |
79 | 108 | | |
80 | 109 | | |
| |||
134 | 163 | | |
135 | 164 | | |
136 | 165 | | |
| 166 | + | |
137 | 167 | | |
138 | 168 | | |
139 | 169 | | |
140 | 170 | | |
141 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
142 | 179 | | |
143 | 180 | | |
144 | 181 | | |
145 | 182 | | |
146 | 183 | | |
| 184 | + | |
147 | 185 | | |
148 | 186 | | |
| 187 | + | |
149 | 188 | | |
150 | 189 | | |
151 | 190 | | |
| |||
215 | 254 | | |
216 | 255 | | |
217 | 256 | | |
218 | | - | |
| 257 | + | |
219 | 258 | | |
220 | 259 | | |
221 | 260 | | |
| |||
229 | 268 | | |
230 | 269 | | |
231 | 270 | | |
232 | | - | |
| 271 | + | |
233 | 272 | | |
234 | 273 | | |
235 | 274 | | |
| |||
239 | 278 | | |
240 | 279 | | |
241 | 280 | | |
242 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
243 | 290 | | |
244 | 291 | | |
245 | 292 | | |
| |||
250 | 297 | | |
251 | 298 | | |
252 | 299 | | |
253 | | - | |
| 300 | + | |
254 | 301 | | |
255 | 302 | | |
256 | 303 | | |
| |||
271 | 318 | | |
272 | 319 | | |
273 | 320 | | |
274 | | - | |
| 321 | + | |
275 | 322 | | |
276 | | - | |
| 323 | + | |
277 | 324 | | |
278 | 325 | | |
279 | 326 | | |
| |||
0 commit comments