Skip to main content
Glama

browser_eval

Automate web application testing with Playwright browser automation. Load and interact with pages in real browsers to detect runtime errors, hydration issues, and client-side problems.

Instructions

Automate and test web applications using Playwright browser automation. This tool connects to playwright-mcp server and provides access to all Playwright capabilities.

CRITICAL FOR PAGE VERIFICATION: When verifying pages in Next.js projects (especially during upgrades or testing), you MUST use browser automation to load pages in a real browser instead of curl or simple HTTP requests. This is because:

  • Browser automation actually renders the page and executes JavaScript (curl only fetches HTML)

  • Detects runtime errors, hydration issues, and client-side problems that curl cannot catch

  • Verifies the full user experience, not just HTTP status codes

  • Captures browser console errors and warnings via console_messages action

IMPORTANT FOR NEXT.JS PROJECTS: If working with a Next.js application, PRIORITIZE using the 'nextjs_index' and 'nextjs_call' tools instead of browser console log forwarding. Next.js has built-in MCP integration that provides superior error reporting, build diagnostics, and runtime information directly from the Next.js dev server. Only use browser_eval's console_messages action as a fallback when these Next.js tools are not available or when you specifically need to test client-side browser behavior that Next.js runtime cannot capture.

Available actions:

  • start: Start browser automation (automatically installs if needed). Verbose logging is always enabled.

  • navigate: Navigate to a URL

  • click: Click on an element

  • type: Type text into an element

  • fill_form: Fill multiple form fields at once

  • evaluate: Execute JavaScript in browser context

  • screenshot: Take a screenshot of the page

  • console_messages: Get browser console messages (for Next.js, prefer nextjs_index/nextjs_call tools instead)

  • close: Close the browser

  • drag: Perform drag and drop

  • upload_file: Upload files

  • list_tools: List all available browser automation tools from the server

Note: The playwright-mcp server will be automatically installed if not present.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoThe action to perform using browser automation
browserNo
headlessNo
urlNo
elementNo
refNo
doubleClickNo
buttonNo
modifiersNo
textNo
fieldsNo
scriptNo
fullPageNo
errorsOnlyNo
startElementNo
startRefNo
endElementNo
endRefNo
filesNo
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses auto-installation, verbose logging, and that the tool renders JavaScript. However, it fails to mention that actions like click, type, and upload_file can modify application state (destructive nature), which is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with bold headings, but it is longer than necessary, especially the Next.js sections which repeat similar points. The list of actions is redundant with the input schema enum.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (19 parameters, no output schema), the description covers overall purpose and usage but lacks details on return values for each action, error handling, or expected outputs like screenshot URLs or navigation results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 5% schema description coverage and 19 parameters, the description does not explain individual parameters beyond listing actions. It does not map actions to required parameters or clarify how parameters like 'element', 'ref', or 'fields' are used for specific actions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool automates and tests web applications using Playwright, with a specific verb and resource. It distinguishes from sibling tools like nextjs_call by advising when to prefer them for Next.js console logging.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides when to use this tool (page verification over curl) and when not to (prefer nextjs_index/nextjs_call for console logging). It names alternative tools and gives context for Next.js projects.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/DaJo-Code/midnight-nextjs-mcp'

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