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.

exclamation, warning, alert-40026.jpgTip: 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”


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”


browser_hover

Purpose: Hover mouse over specific element on webpage.
Input example:

{}

Output/Notes: Mouse positioned over target element for interactions.
Additional Notes: Useful for triggering hover effects and tooltips.
Example Prompt: “Hover over the login button”


browser_select_option

Purpose: Select options from dropdown menus on webpage.
Input example:

{}

Output/Notes: Selected option becomes active in dropdown menu.
Additional Notes: Supports both single and multiple option selection
Example Prompt: “Select 'Premium' from the subscription dropdown”


browser_snapshot

Purpose: Capture accessibility snapshot of current webpage state.
Input example:

{}

Output/Notes: Returns structured accessibility tree with interactive elements.
Additional Notes: Better than screenshots for automated interactions.
Example Prompt: “Take a snapshot of the page”


browser_screen_capture

Purpose: Take visual screenshot of current browser page.
Input example:

{}

Output/Notes: Returns image file of webpage or element.
Additional Notes: Use for visual verification, not for actions.
Example Prompt: “Take a screenshot of the form”


browser_network_requests

Purpose: List all network requests since page loading.
Input example:

{}

Output/Notes: Array of HTTP requests with details and timing.
Additional Notes: Useful for debugging API calls and performance.
Example Prompt: “Show me all network requests made”

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_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

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_take_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


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.”


browser_wait_for

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”

OTHER COMMANDS


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”


browser_generate_playwright_test

Purpose: Generate Playwright test code from scenario description.
Input example:

{}

Output/Notes: Returns complete Playwright test script code.
Additional Notes: Creates reusable automated test scripts efficiently.
Example Prompt: “Generate test for login flow validation”


run_playwright_test

Purpose: Execute Playwright test script on cloud browsers.
Input example:

{}

Output/Notes: Test execution results with pass/fail status.
Additional Notes: Runs on Mobitru cloud with video recording.
Example Prompt: “Run this login test on Firefox”


mcp_server_info

Purpose: Get current MCP server configuration and status.
Input example:

{}

Output/Notes: Returns server details, version and connection status.
Additional Notes: Helpful for debugging and configuration verification.
Example Prompt: “Show me server information and status”


playwright_script_requirements

Purpose: .
Input example:

{}

Output/Notes: .
Additional Notes: .
Example Prompt: “”

exclamation, warning, alert-40026.jpgTip: All session data, logs, screenshots, and HAR captures are saved in the persistent directory: ~/.mobitru-mcp
Scroll to Top