Why? Just give it access to the playwright mcp server.
I‘m using this, works really well and doesn’t pollute context as much:
https://github.com/steipete/agent-scripts/blob/main/scripts/...