Skip to content

fix(docs): use target for MCP element tool parameters - #2132

Open
Ravi Kumar Gupta (EDWARD-012) wants to merge 1 commit into
microsoft:mainfrom
EDWARD-012:fix/mcp-docs-ref-to-target
Open

fix(docs): use target for MCP element tool parameters#2132
Ravi Kumar Gupta (EDWARD-012) wants to merge 1 commit into
microsoft:mainfrom
EDWARD-012:fix/mcp-docs-ref-to-target

Conversation

@EDWARD-012

Copy link
Copy Markdown

Summary

  • MCP element tools expect target / startTarget / endTarget in the live Zod schemas, but the docs taught ref / startRef / endRef
  • Update parameter tables and examples across the MCP guide
  • Keep accessibility snapshot [ref=...] tokens unchanged
  • Also align browser_evaluate docs to use function (schema field) instead of expression

Fixes microsoft/playwright#42539

Coordination with #42517

Open screenshots-only PRs on this repo:

This PR includes the same screenshots.mdx reftarget change plus the broader click/type/fill/drag/etc. docs. Maintainers can land this as the combined fix, or drop the screenshots hunk if one of those PRs merges first.

Test plan

  • Grep MCP docs for tool-arg { ref: / | \ref` |` leftovers (none)
  • Confirm [ref=eN] snapshot tokens still present in interaction/forms/snapshots pages
  • Spot-check rendered pages after merge: /mcp/tools/interaction, /mcp/tools/forms, /mcp/tools/screenshots

MCP tool schemas expect target / startTarget / endTarget, but the docs
documented ref / startRef / endRef. Update parameter tables and examples
across the MCP guide while keeping accessibility snapshot [ref=...] tokens.

Fixes: microsoft/playwright#42539
Related: microsoft/playwright#42517
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: MCP tool docs use ref but schemas require target (click/type/fill/drag)

1 participant