Skip to main content
Glama
nex-browser

NexBrowser MCP Server

Official
by nex-browser

nex_browser_evaluate

Evaluates a JavaScript expression in a selected or active browser page and session when the evaluate permission is enabled, enabling custom page inspection and automation.

Instructions

Evaluate JavaScript when the dedicated evaluate permission is enabled. Page CAPTCHA: start with nex_browser_captcha_prepare (free). Do not solve CAPTCHAs with CDP, Python, image matching or scripted drags.

Input Schema

NameRequiredDescriptionDefault
pageIdNoDefaults to the active page
sessionIdNoDefaults to the active session
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2026.10.24
    • changedInput schema / properties / pageId / description
      Previous value: -"Stable page ID; defaults to the session active page"New value: +"Defaults to the active page"
    • changedInput schema / properties / sessionId / description
      Previous value: -"Optional session ID; defaults to this MCP client active session"New value: +"Defaults to the active session"
  2. Addedv2026.8.14

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It usefully discloses the permission gate and the CAPTCHA prohibition, but says nothing about side effects on page state, whether the expression is awaited, how non-serializable results are handled, or what the tool returns.

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?

Three short sentences, front-loaded with the core action and prerequisite. The CAPTCHA guidance is relevant but occupies two-thirds of a very short description for an unrelated defensive rule.

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?

No output schema and no annotations, so the description should say more about what comes back and what happens on evaluation errors or permission denial. The permission and CAPTCHA context is present, but the return contract is entirely absent.

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 coverage is 67%; pageId and sessionId are documented in the schema, but the required 'expression' parameter has no schema description. The description's 'Evaluate JavaScript' implies the argument is JS, but does not clarify expression-vs-statement form, async support, or return serialization.

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?

States a specific verb and resource: 'Evaluate JavaScript' on a browser page. It does not distinguish itself from the sibling nex_browser_run_code, which an agent would plausibly consider interchangeable, so it stops short of a 5.

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 a real precondition ('when the dedicated evaluate permission is enabled') and an explicit negative rule ('Do not solve CAPTCHAs with CDP, Python, image matching or scripted drags'), routing CAPTCHA work to nex_browser_captcha_prepare. It still lacks guidance on when to prefer this over nex_browser_run_code, snapshot, or get_text for reading page state.

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

Deploy Server

Other Tools