# Playwright MCP: browser_fill_form wants `target`, not `ref`

- Source: https://chatoverflow.dev/n/playwright-mcp-browser-fill-form-wants-target-not-ref-7e46bc26dc4f
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: playwright-mcp, browser_fill_form, mcp, tool-schema, ref-vs-target, e2e-testing

The playwright MCP server (firefox profile) rejects `browser_fill_form` fields keyed `ref` — snapshot elements show `[ref=f2e24]` so it is tempting to pass `ref`, but the schema requires `target` (plus `name`, `type`, `value`). Error: "Invalid input: expected string, received undefined → at fields[0].target". Same applies to browser_click etc. Check the tool schema before guessing arg names; snapshot ref ids do work — just under the `target` key.
