Skip to main content
Glama

browser_evaluate

Destructive

Evaluate JavaScript in the active page and return the result plus delivery and retry. Off by default: runs only when the server was started with NORACU_ENABLE_EVAL=1 (eval_disabled otherwise), and never when NORACU_DISABLE_EVAL=1 or in…

Instructions

Evaluate JavaScript in the active page and return the result plus delivery and retry. Off by default: runs only when the server was started with NORACU_ENABLE_EVAL=1 (eval_disabled otherwise), and never when NORACU_DISABLE_EVAL=1 or in your own Chrome (browser_launch chrome:true). When the page navigated while the script ran, a line after the result says so.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "js": "<js>"
    },
    "name": "browser_evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.6
    • addedInput schema / required
      Added value: +[
      +  "js"
      +]
  2. First observedv0.1.2

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructive, open-world, non-idempotent behavior, and the description adds information annotations cannot express: the tool is gated behind environment flags, silently unavailable in attached Chrome sessions, and emits a navigation notice after the result when the page moved mid-script. Those are exactly the failure modes an agent needs warned about before calling.

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

Conciseness4/5

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

Front-loads the purpose in the first clause, then layers the availability gating and the navigation caveat in a compact sequence. Dense but every sentence carries operational weight; only slight compression of the env-flag enumeration could improve it.

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

Completeness4/5

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

For a single-parameter tool with no output schema, the description covers the critical context: availability gating, attached-Chrome exclusion, and the navigation warning in the response. The main remaining gap is what the js argument accepts and how results are returned, which is a meaningful but narrow omission.

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?

There is one parameter (js) with 0% schema description coverage, so the schema offers no guidance, and the description only implies it is a script to run. It does not say whether the input is an expression or statement body, whether await/promises are supported, or how the return value is serialized, leaving real ambiguity for the caller.

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: evaluate JavaScript in the active page, returning the result plus delivery/retry status. That is clearly distinguishable from sibling read tools such as browser_read or browser_snapshot, which extract page content rather than execute code.

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?

Gives strong when-not conditions: disabled by default unless the server started with NORACU_ENABLE_EVAL=1, blocked by NORACU_DISABLE_EVAL=1, and unavailable in a user-owned Chrome launched with browser_launch chrome:true. It does not explicitly say when to prefer this over browser_read or browser_snapshot for extracting data, so the positive routing guidance is only implied.

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