Skip to main content
Glama

browser_eval

Destructive

Run a JavaScript expression in Reado's browser preview to read app state, call page functions, or scroll nested containers; returns a JSON-serialized value.

Instructions

Run a JavaScript expression in the preview page and answer its value, JSON-serialized. The escape hatch for what the other browser_* tools don't cover — reading app state, calling page functions, scrolling a nested container; prefer them when they fit. Evaluated synchronously (a Promise is not awaited), and it can change the page. Needs Reado's browser preview open with agent access on: without it the call fails after about 6 s with "no preview pane running". On a page holding a credential it is refused until the user grants access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsYesA JavaScript expression; wrap statements in an IIFE, e.g. `(() => { …; return x })()`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.32.1
    • addedInput schema / properties / js / description
      Added value: +"A JavaScript expression; wrap statements in an IIFE, e.g. `(() => { …; return x })()`."
  2. First observedv1.32.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses synchronous evaluation (Promises are not awaited), that it can mutate the page, that a missing preview pane fails after ~6 s with the literal error 'no preview pane running', and that credential-holding pages are refused until the user grants access. The destructiveHint=true annotation is consistent with 'it can change the page'.

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?

Front-loads the core action and return format, then usage guidance, then behavioral caveats and prerequisites. Every sentence carries distinct, non-redundant information with no padding.

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?

Covers the action, the return format, prerequisite/auth gating, failure timing and error message, and execution semantics for a single-parameter tool with no output schema. Nothing an agent needs to call it correctly appears to be missing.

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%, so the js parameter and the IIFE-wrapping convention are already documented in the schema. The description adds the JSON-serialization of the return value but no further syntax detail, so the baseline 3 applies.

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?

States a specific verb and resource ('Run a JavaScript expression in the preview page') and immediately names its scope against siblings ('the escape hatch for what the other browser_* tools don't cover'). An agent can distinguish it from browser_console/browser_dom without opening a schema.

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?

Explicitly gives when-to-use examples (reading app state, calling page functions, scrolling a nested container) and a when-not-to-use rule ('prefer them when they fit'). It also states the prerequisite: a Reado browser preview must be open with agent access on.

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