MCPVault

function

MCP tool from Playwright MCP by microsoft

(string): () => { / code / } or (element) => { / code / } when element is provided

How to use it

function is exposed by the Playwright MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the function tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.

Install Playwright MCP

$claude mcp add playwright npx @playwright/mcp@latest
FULL PLAYWRIGHT MCP LISTING

Other tools in Playwright MCP (39)

accept

(boolean): Whether to accept the dialog.

all

(boolean, optional): Return all console messages since the beginning of the session, not just since the last navigation. Defaults to false.

browser_click
browser_close
browser_console_messages
browser_drag
browser_drop
browser_evaluate
browser_file_upload
browser_fill_form
browser_find
browser_handle_dialog
browser_hover
browser_navigate
browser_navigate_back
browser_network_request
browser_network_requests
button

(string, optional): Button to click, defaults to left

data

(object, optional): Data to drop, as a map of MIME type to string value (e.g. {"text/plain": "hello", "text/uri-list": "https://example.com"}).

doubleClick

(boolean, optional): Whether to perform a double click instead of a single click

element

(string, optional): Human-readable element description used to obtain permission to interact with the element

endElement

(string, optional): Human-readable target element description used to obtain the permission to interact with the element

endTarget

(string): Exact target element reference from the page snapshot, or a unique element selector

fields

(array): Fields to fill in

filename

(string, optional): Filename to save the console messages to. If not provided, messages are returned as text.

filter

(string, optional): Only return requests whose URL matches this regexp (e.g. "/api/.user").

index

(integer): 1-based index of the request, as printed by browsernetworkrequests.

level

(string): Level of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".

modifiers

(array, optional): Modifier keys to press

part

(string, optional): Return only this part of the request. Omit to return full details.

paths

(array, optional): Absolute paths to files to drop onto the element.

promptText

(string, optional): The text of the prompt in case of a prompt dialog.

regex

(string, optional): Regular expression to search for in the page snapshot. Matching is case-sensitive by default; wrap the pattern in slashes to add flags, e.g. "/error/i" for case-insensitive. Provide either text or regex, not both.

startElement

(string, optional): Human-readable source element description used to obtain the permission to interact with the element

startTarget

(string): Exact target element reference from the page snapshot, or a unique element selector

static

(boolean): Whether to include successful static resources like images, fonts, scripts, etc. Defaults to false.

target

(string): Exact target element reference from the page snapshot, or a unique element selector

text

(string, optional): Plain text to search for in the page snapshot (case-insensitive substring match). Provide either text or regex, not both.

url

(string): The URL to navigate to