Skip to main content
Glama
feder-cr

invisible-playwright-mcp

by feder-cr

browser_evaluate

Run JavaScript in a page to read computed styles, framework state, or list lengths, and return the result as JSON. Use it to inspect values that other tools cannot see without changing the page.

Instructions

READ from the page with JavaScript and get the result as JSON.

For what the other tools cannot see: a computed style, a value held in a framework's state, the length of a list.

Acting on the page is refused, and the refusal names the tool to use. Assigning to value, checked or selected, or calling click(), dispatchEvent(), submit() or requestSubmit(), changes the page without a real keystroke or pointer, and a page can tell. Use browser_click, browser_type or browser_select_option instead; they do the same thing through the pointer and the keyboard. Reading any of those properties is fine.

The refusal catches the obvious spellings, not every possible one. A script that slips past it is still the wrong way to do the thing: report it in your answer rather than using it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well. It states that acting on the page is refused, that the refusal names the correct tool, and that attempts to bypass the guard are the wrong approach and should be reported rather than used. This gives the agent an accurate model of the tool's safety boundary.

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 front-loaded with the core capability, then gives concrete examples, then explains the read-only boundary and alternatives. Each paragraph earns its place, and the structure moves from what the tool does to when not to use it to the correct fallback behavior.

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

Completeness5/5

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

For a one-parameter read-only evaluate tool, the description covers purpose, use cases, restrictions, alternatives, and expected output format. The presence of an output schema covers the return value details, so nothing essential is missing for an agent to select and invoke this tool correctly.

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

Parameters4/5

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

The input schema only says 'Expression' with no description, so the description must compensate. It explains that the expression is JavaScript and that its result is returned as JSON, and gives example targets. It does not spell out the exact expected syntax or return serialization rules, but for a single self-named parameter the provided context is sufficient.

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 opens with a specific action and resource: 'READ from the page with JavaScript and get the result as JSON.' It also gives concrete use cases (computed style, framework state, list length) that are not covered by sibling tools, clearly distinguishing browser_evaluate from browser_read_text and browser_snapshot.

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 says when browser_evaluate is the right tool ('For what the other tools cannot see') and when it is not: mutations, clicks, typing, and selection changes. It names browser_click, browser_type, and browser_select_option as the alternatives, giving the agent direct routing guidance.

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