Skip to main content
Glama

Playwright MCP

by lewisvoncken
Apache 2.0
275,350
  • Linux
  • Apple

browser_evaluate

Execute JavaScript expressions on web pages or specific elements using a structured accessibility snapshot. Enables interaction with page elements without requiring screenshots or visually-tuned models.

Instructions

Evaluate JavaScript expression on page or element

Input Schema

NameRequiredDescriptionDefault
elementNoHuman-readable element description used to obtain permission to interact with the element
functionYes() => { /* code */ } or (element) => { /* code */ } when element is provided
refNoExact target element reference from the page snapshot

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "element": { "description": "Human-readable element description used to obtain permission to interact with the element", "type": "string" }, "function": { "description": "() => { /* code */ } or (element) => { /* code */ } when element is provided", "type": "string" }, "ref": { "description": "Exact target element reference from the page snapshot", "type": "string" } }, "required": [ "function" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lewisvoncken/playwright-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server