Skip to main content
Glama

Browser Control MCP by Nova (CIVAI)

browser_exec_js

Run JavaScript on a target tab (same CDP evaluate path as BrowserGPT Quick Task exec_js). Requires tab_id from browser_tabs. Returns ok, value, logs, metrics.

Input Schema

NameRequiredDescriptionDefault
tab_idYesbrowser_tabs targetId
javascriptYesJavaScript source to evaluate
timeout_msNoDefault 15000, max 120000
notification_messageNoShort user-facing sentence for this action if the follow-up reply fails. Plain text only; do not mention template syntax or variable names.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

There are no annotations, so the description must carry the behavioral burden: it does disclose the return shape (ok, value, logs, metrics) and the tab dependency, plus the schema notes the 15s default/120s max timeout. It does not disclose that execution is arbitrary and may mutate page state, nor what error conditions look like when ok is false.

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 with the action front-loaded and the prerequisite and return contract following. The BrowserGPT Quick Task reference is mild name-dropping but earns its place as an implementation-equivalence hint.

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 four-parameter tool with no output schema, the description still names the return fields, the required tab handle, and the execution channel, which is enough to call it correctly. The main omission is the absence of any warning about side effects of arbitrary JS execution.

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 all four parameters are already documented, including tab_id's source and the timeout range. The description only restates the tab_id dependency and adds nothing about the timeout or notification_message semantics; the baseline of 3 applies.

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 on a target tab' — and adds a concrete implementation note (CDP evaluate path, equivalent to BrowserGPT Quick Task exec_js). An agent can readily distinguish it from siblings like browser_click or browser_navigate, though it never explicitly contrasts against them.

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?

Provides a genuine prerequisite — 'Requires tab_id from browser_tabs' — which tells the agent to obtain a tab first. However, it gives no guidance on when to prefer this over the higher-level interaction tools (browser_click, browser_fill, browser_snapshot) or when arbitrary JS is inappropriate.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources