Skip to main content
Glama
lauyuen

stealth-browser-mcp

by lauyuen

browser_evaluate

Run custom JavaScript in the active page and get the result—use it to extract page data, test conditions, or trigger actions directly in the browser context.

Instructions

Execute a custom JavaScript expression in the active page context and return the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript code to evaluate (e.g. "document.title" or "window.location.href")
Behavior2/5

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

With no annotations to fall back on, the description must fully disclose behavioral traits. It mentions execution in the active page context and returning a result, but omits critical details: that the script can modify the page (side effects), that the result must be JSON-serializable, that errors may be thrown, and whether execution is synchronous. These gaps are significant for a tool that runs arbitrary code, leaving the agent uncertain about safety and output formatting.

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?

The description is a single concise sentence that front-loads the primary action and outcome. It contains no filler and is easily parsed. While it could benefit from a note about return value constraints, the current length is appropriate for the tool's simplicity. It is slightly under-specified in terms of structure, but that is a minor point given the brevity.

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

Completeness2/5

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

For a tool that executes arbitrary JavaScript, the description is notably incomplete. It does not explain what happens to non-serializable results (e.g., functions, undefined), whether errors are propagated, or if the script can have persistent effects. Since there is no output schema, the description should cover return-value behavior. The absence of this information makes the tool risky for agents to use correctly, especially in a browser automation context.

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?

The schema description fully covers the single 'script' parameter with examples (“document.title”, “window.location.href”), so the baseline is 3. The tool description adds little beyond the schema—it restates that the script runs in the page context and that the result is returned, but does not elaborate on how the script's return value is serialized or formatted. Given high schema coverage, the description does not need to duplicate parameter details; it only adds minimal context, so a 3 is appropriate.

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?

The description clearly states that this tool executes a custom JavaScript expression in the active page context and returns the result. The verb 'execute' with the resource 'custom JavaScript expression' is specific, and it distinguishes itself from sibling tools like browser_extract_text or browser_click by focusing on arbitrary script evaluation. The purpose is unambiguous even without seeing the schema.

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?

The description implies that this tool is for running arbitrary JavaScript, which is distinct from higher-level browser actions like clicking, typing, or extracting content. However, it does not explicitly say when to prefer this over alternatives or caution against using it when a more specific tool fits. The guidance is implicit rather than explicit, leaving the agent to infer the intended use case.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lauyuen/stealth-browser-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server