Skip to main content
Glama
furugen

Playwright MCP

by furugen

browser_evaluate

Destructive

Execute JavaScript expressions on web pages or specific elements to interact with or extract data, leveraging Playwright MCP for structured browser automation without visual models.

Instructions

Evaluate JavaScript expression on page or element

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementNoHuman-readable element description used to obtain permission to interact with the element
functionYes() => { /* code */ } or (element) => { /* code */ } when element is provided
refNoExact target element reference from the page snapshot
Behavior4/5

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

The description doesn't contradict annotations. Annotations indicate this is a destructive, non-read-only operation with open-world characteristics. The description adds context by specifying it evaluates JavaScript on 'page or element,' which helps clarify the scope beyond what annotations provide. However, it doesn't detail potential side effects like page modifications or security implications.

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

Conciseness5/5

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

The description is extremely concise—a single, clear phrase with no wasted words. It's front-loaded with the core functionality, making it easy to understand at a glance without unnecessary elaboration.

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 tool's complexity (JavaScript evaluation in a browser with destructive potential) and lack of output schema, the description is minimal. It covers the basic purpose but doesn't address return values, error handling, or security considerations, leaving gaps for an AI agent to infer behavior in a potentially risky operation.

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

Parameters3/5

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

With 100% schema description coverage, the schema already documents all three parameters thoroughly. The description adds minimal value beyond the schema by implying the 'element' parameter is optional (evaluating on 'page or element'), but doesn't provide additional syntax or usage details. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('evaluate') and target ('JavaScript expression on page or element'), distinguishing it from sibling tools that perform physical interactions like click, type, or navigate. However, it doesn't specify that this is for browser automation contexts, which is implied but could be more explicit.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention that this is for executing custom JavaScript code in a browser context, nor does it differentiate from other browser tools like browser_console_messages (for reading console output) or browser_snapshot (for capturing page state).

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

Related 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/furugen/playwright-mcp'

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