Skip to main content
Glama

browser_run

Execute JavaScript in a persistent local Node runtime to control browser sessions, manage tabs, navigate, fill forms, and capture screenshots; variables and top-level await persist across calls.

Instructions

Run JavaScript in a persistent local Node runtime with cua browser methods and nodeRepl output helpers. Top-level await and variables persist. Full local OS permissions; not a security sandbox. Read browser_api first.

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": {
      "code": "<code>"
    },
    "name": "browser_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses full local OS permissions, explicitly warns this is not a security sandbox, and states that top-level await and variables persist across calls. It stops short of covering error behavior, what happens on timeout, or what the call 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?

Four short sentences, front-loaded with what the runtime is, then persistence, then the safety caveat, then the prerequisite. No filler; only the trailing 'Read browser_api first' reads as slightly tacked on rather than integrated.

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?

For an arbitrary-code-execution tool with no annotations and no output schema, the safety and persistence disclosures are the right priorities and are present. The gaps are the undocumented timeout parameter and the absence of any statement about return values or failure modes, which matter for a tool an agent will script against.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for both parameters and it largely does not. The `code` parameter is only indirectly implied, and `timeoutMs` (default 30000, max 60000) is never mentioned at all, so an agent cannot learn the timeout semantics or bounds from the description.

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: run JavaScript in a persistent local Node runtime that exposes cua browser methods and nodeRepl output helpers. That clearly separates it from granular siblings like browser_click or browser_fill, though it never explicitly contrasts itself with those action tools.

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

Usage Guidelines3/5

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

It gives one concrete prerequisite, 'Read browser_api first', which is genuinely useful routing guidance. However, it never says when to reach for this escape hatch versus the dedicated browser_* action tools, leaving the main selection decision to inference.

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