Model Context Protocol implementation for browser automation using Selenium WebDriver
The server defines 29 tools with comprehensive descriptions (average 180-220 chars, within baseline 194 char average). All tools have clear, action-verb names (navigate, click, getText, etc.) and documented input parameters. However, NO input/output schemas are visible in the provided source code. The code snippet is truncated and does not show JSON Schema definitions, parameter types, or documented return structures. While descriptions are strong (e.g., 'Navigates to the specified URL with intelligent protocol handling...'), the absence of verifiable schemas is a critical gap. Parameter descriptions exist in tool definitions but formal JSON Schema validation cannot be confirmed. All tools have risk classifications (READ_ONLY, WRITE) which is good practice. Error handling descriptions are present but recovery guidance is limited in most tools.
Performs a click operation on the specified element. Locates the element, ensures it's visible and clickable, then performs the click action. Includes automatic scrolling and wait conditions for reliable interaction across different page layouts.
Performs a double-click operation on the specified element. Uses the Actions API to simulate a precise double-click gesture. Ensures element visibility before performing the action.
Evaluates XPath expressions and returns detailed node information. Executes XPath queries against the current document and returns comprehensive information about matching nodes including tag names, text content, IDs, and class names.
Executes asynchronous JavaScript code in the browser context. Runs JavaScript code that requires asynchronous execution patterns such as callbacks, promises, or timed operations. The script should call the provided callback function when complete.
Executes synchronous JavaScript code in the browser context. Runs the provided JavaScript code and returns the formatted result. Supports parameter passing and handles various return types including WebElements, collections, and primitive values.
No verifiable JSON Schema definitions in source code. While input parameters are documented with types and descriptions in annotations, formal JSON Schema objects with 'type', 'properties', 'required' fields are not visible in the provided code snippet. This violates the critical requirement that schemas must be machine-parseable and prevents validation tooling from confirming proper schema structure.
No documented output schemas. Tools describe what they return in natural language (e.g., 'returns the resulting URL', 'returns comprehensive metadata') but no structured schema for response objects is visible. LLMs cannot reliably extract fields without documented response structures. This violates the requirement that all tools document their return types.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 56 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 0 | - | v1 |
Fills an input element with the specified text value. Supports various input types including text fields, textareas, and other form elements. Optionally clears existing content before entering new text.
Finds all elements matching the specified selector. Returns detailed information about each matching element including tag name, ID, class, text content, and attributes.
Retrieves the value of a specified attribute from the selected element. Returns detailed attribute information including name and value.
Retrieves browser cookies by name or all cookies if name is null. Supports client-side cookie retrieval with parsing.
Retrieves the current URL of the active browser tab. Returns the complete URL including protocol, domain, path, and query parameters. Useful for verification and debugging.
Gathers comprehensive information about the current page state. Collects detailed page metadata including URL, title, document ready state, and scroll dimensions. Useful for page analysis and debugging.
Retrieves the complete HTML source of the current page. Returns the full HTML document source including all dynamically generated content and modifications made by JavaScript.
Retrieves the text content of the specified element. Returns the visible text content of an element. For input elements, automatically retrieves the value attribute if text content is empty. Handles various element types intelligently.
Retrieves the title of the current page. Returns the HTML document title as displayed in the browser tab. Useful for page verification and content validation.
Navigates backward in the browser history. Simulates clicking the browser's back button. Includes a brief delay to allow navigation to complete and returns the resulting URL.
Navigates forward in the browser history. Simulates clicking the browser's forward button. Includes a brief delay to allow navigation to complete and returns the resulting URL.
Performs a hover operation over the specified element. Simulates mouse hovering to trigger hover effects, tooltips, or dropdown menus. Includes fallback JavaScript-based hover for elements that don't respond to Actions hover.
Checks if the specified element is enabled. Returns a boolean indicating whether the element is available for interaction.
Checks if the specified element is visible on the page. Returns a boolean indicating element visibility status. Handles timeout and nonexistent element cases gracefully.
Navigates to the specified URL with intelligent protocol handling. Automatically normalizes URLs by adding HTTPS protocol if missing, performs the navigation, and waits for complete page load using document.readyState monitoring.
Refreshes the current page and waits for complete reload. Simulates pressing F5 or clicking the refresh button. Uses document.readyState monitoring to ensure the page has fully loaded before returning control.
Performs a right-click (context menu) operation on the specified element. Uses the Actions API to simulate a right-click gesture, typically used to open context menus or trigger custom interactions.
Saves a screenshot to the local filesystem with automatic naming. Captures a viewport screenshot and saves it as a PNG file. If no filename is provided, generates a timestamp-based name automatically.
Selects an option from a dropdown/select element. Supports selection by visible text, value attribute, or index position. Automatically wraps the element in a Select object for proper handling.
Sets a browser cookie with the specified name, value, and expiration. Creates or updates a cookie using client-side JavaScript with automatic expiration date calculation based on the provided days parameter.
Captures a screenshot of a specific element on the page. Locates the specified element, scrolls it into optimal view, and captures an isolated screenshot containing only that element. Perfect for focused testing and element-specific documentation.
Captures a full-page screenshot using advanced tiling algorithm. Creates a complete screenshot of the entire page content, including areas below the fold that require scrolling. Uses intelligent tiling to capture the full page in sections and seamlessly combines them into a single high-resolution image.
Captures a screenshot of the current browser viewport. Takes a high-quality PNG screenshot of the visible browser area and returns comprehensive metadata including Base64-encoded image data, timestamps, and page context information.
Waits for an element to appear on the page within the specified timeout period. Useful for handling dynamic content and asynchronous page loads.
Limited error recovery guidance. While tools document what they do, error descriptions do not consistently explain recovery paths. For example, 'click' and 'waitForElement' don't specify whether timeouts are retryable, how long to wait before retrying, or what to do if an element is not found. LLMs need explicit guidance: 'If element not found, try searching with a different selector using findElements().'
No input validation rules in parameter descriptions. Parameters like 'timeout' and 'days' lack explicit min/max constraints in the descriptions. E.g., 'timeout' in waitForElement should state '(integer, 1 - 300 seconds)', and 'days' in setCookie should state '(integer, 1 - 365)'. Without these, LLMs may pass unbounded or invalid values.
Selector parameter lacks specificity. The 'selector' parameter used across many tools (click, doubleClick, hover, getText, etc.) documents that it 'supports all selector types' but does not clearly enumerate them or explain precedence. Should state: 'CSS selector, XPath, element ID, or element Name. CSS selectors preferred for performance.'
No security documentation for executeScript / executeAsyncScript. These tools can execute arbitrary JavaScript, which is a significant security boundary. No warning about code injection, no guidance on sandboxing, no mention of what globals are accessible. Should document: 'This executes code in the browser context. Do not pass untrusted input as the script parameter.'
No pagination guidance for findElements. This tool returns 'detailed information about each matching element' but does not specify a result limit, pagination support, or guidance if thousands of elements match.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) visible in the provided code. While tools are marked with Risk classifications (READ_ONLY, WRITE) in the assessment, the MCP spec recommends explicit tool annotations in the schema for protocol-level clarity. These should be added to the tool registration.