Skip to main content
Glama
Lars-Albinsson

playwright-react-debug-mcp

evaluate_js

Run custom JavaScript in the browser to inspect and debug page state. Use return to retrieve values for analysis.

Instructions

Execute arbitrary JavaScript in the page context. Powerful for custom inspection and debugging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to execute. Use "return" to return values.
Behavior2/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 of behavioral disclosure. It calls the tool 'powerful' but does not disclose potential side effects like page state mutation, irreversible changes, or the ability to crash or navigate the page. The description offers only a high-level statement without detailing the significant risks of arbitrary JS execution.

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 two sentences, front-loaded with the action ('Execute arbitrary JavaScript'), and every word contributes. 'Powerful' is a minor value judgment but not filler, so the description is appropriately sized and structured.

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

Completeness2/5

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

This tool has no output schema and no annotations, so the description should explain the return behavior and safety implications. It does neither; an agent would not know what the evaluated JS returns or the potential destructive impact on the page. The description is too thin for such a powerful and risky tool.

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?

Schema description coverage is 100%, and the parameter description already explains that 'code' should use 'return' to return values. The tool description adds no additional parameter-level detail, so the baseline of 3 is appropriate since the schema handles the semantics.

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 executes arbitrary JavaScript in the page context, which is a specific verb+resource. The phrase 'custom inspection and debugging' distinguishes it from sibling tools like navigate, click, and get_dom, making its purpose unmistakable.

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

Usage Guidelines4/5

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

The description gives clear context for when to use this tool: for custom inspection and debugging. It implies it is a fallback for non-standard actions, but it does not explicitly exclude standard operations or name alternative tools, so it lacks explicit when-not guidance.

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/Lars-Albinsson/playwright-react-debug-mcp'

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