Playwright MCP Catalog
The Playwright MCP server provides structured tools that allow AI assistants (e.g., GitHub Copilot, Cursor, Elitea) to automate browser sessions within Mobitru’s infrastructure.
Each command can be executed manually via JSON or through natural language prompts.
![]() | Tip: You can explore all commands interactively in your IDE by running “List all MCP tools for Playwright.” Each command entry below follows the same format — Purpose, Example JSON Input, Example Prompt, and Output/Notes. |
BROWSER CONTROL COMMANDS
playwright_session_init
Purpose: Start a new Playwright session.
Input example:
{
“browserType”: “chromium”
}Output/Notes: Initializes a Playwright browser session in the specified type (Chromium, Firefox, Chrome, or WebKit). Each session runs isolated and supports navigation, interactions, and artifact capture.
Additional Notes: Required before running any browser actions; otherwise, commands will fail.
Example Prompt: “Start a Playwright session in Chromium”
browser_close
Purpose: Close the current browser session.
Input example:
{
}Output/Notes: Closes the active Playwright browser and releases all resources.
Additional Notes: : Use when you’re done with testing to release the environment.
Example Prompt: “Close the active Chrome browser”
playwright_close_all
Purpose: Close all running Playwright sessions.
Input example:
{
}Output/Notes: Ensures all active Playwright sessions are terminated.
Additional Notes: Recommended cleanup command when multiple sessions were initialized.
Example Prompt: “Close all running browsers”
browser_navigate_back
Purpose:
Navigate one step back in browser history.
Input example:
{
}Output/Notes: Navigates the current page to the previous URL in session history.
Additional Notes: Equivalent to pressing the browser Back button.
Example Prompt: “Go back to the previous page”
browser_navigate_forward
Purpose: Navigate one step forward in browser history.
Input example:
{
}Output/Notes: Navigates forward to the next page in session history if available.
Additional Notes: Equivalent to pressing the browser Forward button.
Example Prompt: “Go forward to the next page”
browser_tab_new
Purpose: Open a new browser tab (page) within the same session context.
Input example:
{
}Output/Notes: Creates a new Playwright page object attached to the current context.
Additional Notes: Useful for parallel flows or cross-tab testing.
Example Prompt: “Open a new browser tab.”
browser_tab_list
Purpose: List all currently opened tabs in the Playwright context.
Input example:
{
}Output/Notes: Returns an array with active tab titles and indexes.
Additional Notes: Indexing starts from 0.
Example Prompt: “List all open tabs”
browser_tab_select
Purpose: Switch to an open tab by index or title..
Input example:
{"args": {"index": 1}}Output/Notes: Focuses the tab specified by its index or title.
Additional Notes: Context must contain at least two tabs.
Example Prompt: “Switch to tab number two”
browser_tab_close
Purpose: Close the current active browser tab.
Input example:
{
}Output/Notes: Closes the current Playwright page instance.
Additional Notes: if it’s the last tab, the context remains open until manually closed.
Example Prompt: “Close the current tab”
browser_screen_click
Purpose: Click at specific screen coordinates instead of by selector.
Input example:
{"args": {"x": 200, "y": 300}}Output/Notes: Sends a mouse click at the provided (x,y) coordinates.
Additional Notes: Useful for canvas or image-based UI interactions.
Example Prompt: “Click at position 200,300.”
browser_screen_drag
Purpose: Drag from one screen coordinate to another.
Input example:
{"args": {"fromX": 100, "fromY": 200, "toX": 300, "toY": 200}}Output/Notes: Simulates a drag-and-drop action using absolute coordinates.
Additional Notes: Can emulate touchscreen drags if no selectors are available.
Example Prompt: “Drag from 100,200 to 300,200”
browser_screen_move_mouse
Purpose: Move the mouse cursor without clicking.
Input example:
{"args": {"x": 400, "y": 250}}Output/Notes: Moves the virtual mouse pointer to the specified coordinates.
Additional Notes: Can be used before hover or visual inspection actions.
Example Prompt: “Move the mouse to 400,250”
browser_screen_type
Purpose: Type text at the current cursor position in screen mode.
Input example:
{"args": {"text": "hello world"}}Output/Notes: Sends keystrokes directly to the focused element..
Additional Notes: Works in coordinate-based mode when element selectors are not available.
Example Prompt: “Type ‘hello world’ at cursor”
browser_resize
Purpose: Resize the browser viewport.
Input example:
{"args": {"width": 1280, "height": 720}}Output/Notes: Changes the visible window size used by the browser.
Additional Notes: Affects rendering and responsive layout behavior.
Example Prompt: “Resize the viewport to 1280×720”
browser_pdf_save
Purpose: Save the current page as a PDF file.
Input example:
{"args": {"path": "page.pdf", "format": "A4"}}Output/Notes: Generates a PDF snapshot of the current page and saves it locally.
Additional Notes: Supported only in Chromium-based browsers.
Example Prompt: “Save the current page as PDF”
browser_console_messages
Purpose: Retrieve all console log messages from the current page.
Input example:
{}Output/Notes: Returns an array of messages with type (log, warn, error) and text.
Additional Notes: Useful for debugging or collecting runtime errors.
Example Prompt: “Show browser console messages”
PAGE INTERACTION COMMANDS
browser_navigate
Purpose: Navigate to a specific URL.
Input example:
{
“args”: {
“url”: “https://www.apple.com”
}
}
Output/Notes: Loads the given URL in the active Playwright browser.
Additional Notes: Works after session initialization; supports Chromium, Firefox, Chrome, WebKit.
Example Prompt: “Open the Apple homepage in Chrome”
browser_reload
Purpose: Reload the current page.
Input example:
{
}Output/Notes: Reloads the active tab and refreshes the page.
Additional Notes: Re-executes all loaded scripts and resources.
Example Prompt: “Reload the current page”
browser_click
Purpose: Click on a page element using a selector.
Input example:
{
“args”: {
“selector”: “#submit-button”
}
}Output/Notes: Performs a click on the element that matches the selector.
Additional Notes: CSS selectors are supported. Ensure the element is visible before executing.
Example Prompt: “Click the Submit button on the page”
browser_type_text
Purpose: Type text into an input field.
Input example:
{
“args”: {
“selector”: “#email”,
“text”: “test@mobitru.com”
}
}Output/Notes: Types the specified text into the target element.
Additional Notes: Supports additional parameters for delay and submission if defined.
Example Prompt: “Type ‘test@mobitru.com’ into the email field”
browser_press_key
Purpose: Press a key on the keyboard.
Input example:
{
“args”: {
“key”: “Enter”
}
}Output/Notes: Simulates a keyboard event within the browser context.
Additional Notes: Useful for form submission or shortcut testing.
Example Prompt: “Press Enter”
browser_scroll
Purpose: Scroll the page vertically or horizontally.
Input example:
{
“args”: {
“direction”: “down”,
“amount”: 500
}
}Output/Notes: Scrolls the page in the specified direction.
Additional Notes: Supports “up”, “down”, “left”, “right” directions.
Example Prompt: “Scroll down the page”
browser_screenshot
Purpose: Capture a screenshot of the current page.
Input example:
{
“args”: {
“path”: “screenshot.png”
}
}Output/Notes: Saves a screenshot to the persistent directory (~/.mobitru-mcp).
Additional Notes: The output includes confirmation with file name and path.
Example Prompt: “Take a screenshot of the current page”
browser_drag
Purpose: Drag one element onto another (HTML5 drag & drop).
Input example:
{
"args": {
"startElement": "#from",
"endElement": "#to"
}
}Output/Notes: Performs a drag-and-drop from the source element to the target element using Playwright’s dragAndDrop.
Additional Notes:
Example Prompt: “Take a screenshot of the current page”
browser_file_upload
Purpose: Upload a file into an <input type=”file”>.
Input example:
{
"args": {
"element": "input[type='file']",
"path": "./fixtures/test.png"
}
}Output/Notes: Sets files on a file input via page.setInputFiles.
Additional Notes:
Example Prompt: “Upload test.png using the file input”
browser_handle_dialog
Purpose: Handle JavaScript dialogs (alert, confirm, prompt).
Input example:
{
"args": {
"action": "accept",
"promptText": "OK"
}
}Output/Notes: Subscribes to page.on(‘dialog’, …) and accepts/dismisses; for prompts can pass text.
Additional Notes:
Example Prompt: “Accept the alert dialog.”
NETWORK & ARTIFACT COMMANDS
browser_console_logs
Purpose: Retrieve console logs from the browser.
Input example:
{}Output/Notes: Fetches console logs from the active Playwright session.
Additional Notes: Use to debug client-side JS issues.
Example Prompt: “Show the console logs from Firefox”
browser_har_start
Purpose: Start capturing network traffic (HAR).
Input example:
{
“args”: {
“path”: “network.har”
}
}Output/Notes: Begins capturing HTTP traffic for performance and debugging.
Additional Notes: Works only in Chromium and Firefox contexts.
Example Prompt: “Start capturing network traffic in Chrome”
browser_har_stop
Purpose: Stop capturing network traffic (HAR).
Input example:
{}Output/Notes: Stops the network capture and saves the HAR file.
Additional Notes: The HAR file is stored in the persistent workspace (~/.mobitru-mcp).
Example Prompt: “Stop network capture and save the HAR file”
browser_download_screenshot
Purpose: Download a screenshot from storage.
Input example:
{
“args”: {
“fileId”: “abc123”
}
}
Output/Notes: Downloads the captured screenshot to the local directory.
Additional Notes: Works with file IDs returned by browser_screenshot.
Example Prompt: “Download the last screenshot taken in Chromium”
browser_download_har
Purpose: Download a HAR capture by ID.
Input example:
{
“args”: {
“harId”: “xyz456”
}
}Output/Notes: Retrieves and downloads the saved HAR file.
Additional Notes: Enables offline analysis of recorded network data.
Example Prompt: “Download the network capture from the last session”
device_farm_upload_artifact
Purpose: Upload a local file to Mobitru Device Farm persistent storage.
Input example:
{
"args": {
"path": "./assets/app.apk",
"name": "app.apk"
}
}Output/Notes: Uploads the file and returns its artifact ID.
Additional Notes:
Example Prompt: “Upload an app.apk artifact to storage“
device_farm_list_artifacts
Purpose:
List all uploaded artifacts available in persistent storage.
Input example:
{}Output/Notes: Returns array of artifact metadata (id, name, size, createdAt).
Additional Notes:
Example Prompt: “List all artifacts in device storage”
device_farm_get_artifact_info
Purpose: Get metadata for a specific uploaded artifact by ID.
Input example:
{
"args": {
"id": "artifact-123"
}
}Output/Notes: Returns information about artifact (file name, size, type, upload date).
Additional Notes: Enables offline analysis of recorded network data.
Example Prompt: “Get details of artifact artifact-123”
device_farm_get_artifact_status
Purpose: Check processing status of an uploaded artifact.ad a HAR capture by ID.
Input example:
{
"args": {
"id": "artifact-123"
}
}Output/Notes: Returns one of: queued, processing, ready, failed.
Additional Notes:
Example Prompt: “Check if artifact artifact-123 is ready.”
playwright_download_session_recording
Purpose: Download the video recording of the current or past Playwright session.
Input example:
{
"args": {
"id": "rec-001"
}
}Output/Notes: Downloads the .webm session recording file.
Additional Notes: Save in ~/.mobitru-mcp/recordings/.
Example Prompt: “Download the last session recording”
get_persistent_storage_info
Purpose: Return information about the persistent storage directory used by MCP.
Input example:
{}Output/Notes: Shows available space, used size, and path (e.g., ~/.mobitru-mcp).
Additional Notes:
Example Prompt: “Show MCP storage info.”
OTHER COMMANDS
browser_wait_for_selector
Purpose: Wait for a specific element to appear.
Input example:
{{
“args”: {
“selector”: “#login-button”,
“timeout”: 5000
}
}Output/Notes: Waits for the element up to the defined timeout (in ms).
Additional Notes: Helps synchronize with dynamic page loading.
Example Prompt: “Wait for the login button to appear”
browser_get_title
Purpose: Retrieve the current page title.
Input example:
{}Output/Notes: Returns the page title as a string.
Additional Notes: Useful for validation in test automation.
Example Prompt: “Get the title of the current page”
browser_get_url
Purpose: Retrieve the current page URL.
Input example:
{
“args”: {
“key”: “Enter”
}
}Output/Notes: Returns the current browser URL.
Additional Notes: Helpful for navigation verification.
Example Prompt: “Get the current URL”
browser_evaluate_script
Purpose: Execute custom JavaScript within the page.
Input example:
{
“args”: {
“script”: “return document.title;”
}
}Output/Notes: Executes JavaScript and returns its result.
Additional Notes: Can be used for assertions or DOM inspection.
Example Prompt: “Run JavaScript to get the document title”
browser_set_viewport
Purpose: Change browser viewport size.
Input example:
{
“args”: {
“width”: 1280,
“height”: 800
}
}Output/Notes: Sets browser viewport for responsive layout testing.
Additional Notes: Works for Chromium, Chrome, Firefox, WebKit.
Example Prompt: “Set viewport to 1280x800”
browser_new_tab
Purpose: Open a new browser tab.
Input example:
{}Output/Notes: Opens a new tab in the current Playwright session.
Additional Notes: Some clients may not support parallel tabs yet.
Example Prompt: “Open a new tab in Chrome”
get_current_date
Purpose: Return the current server date and time (UTC).
Input example:
{}Output/Notes: Returns ISO-formatted timestamp string, e.g. 2025-11-05T10:23:41Z.
Additional Notes: Used for generating timestamps in logs and test scenarios.
Example Prompt: “Get current date and time”
playwright_get_statistics
Purpose: Return runtime statistics of the active Playwright session.
Input example:
{}Output/Notes: Includes browser type, open tabs, network request count, console messages count, etc.
Additional Notes: Helps analyze runtime load and collect session metrics.
Example Prompt: “Show current Playwright session statistics.”
playwright_close
Purpose: Gracefully close the entire Playwright context/session.
Input example:
{}Output/Notes: Closes all active pages and releases Playwright resources.
Additional Notes: Differs from browser_close, which only closes the current tab.
Example Prompt: “Close the Playwright session”
![]() | Tip: All session data, logs, screenshots, and HAR captures are saved in the persistent directory: ~/.mobitru-mcp |
