Skip to main content
Glama
emadklenka

mare-browser-mcp

by emadklenka

browser_eval

Execute custom JavaScript in the browser page context to read state, manipulate the DOM, or trigger events that standard tools don't cover, returning the serialized result.

Instructions

Execute JavaScript in the page context and return the result. This is your ESCAPE HATCH for anything the other tools don't cover. Common use cases: • Read computed styles: getComputedStyle(el).backgroundColor • Append text to inputs without clearing: el.value += '...'; el.dispatchEvent(new Event('input', {bubbles:true})) • Type character-by-character for autocomplete: use dispatchEvent with input events per character • Drag-and-drop: create and dispatch mousedown/mousemove/mouseup or dragstart/drop events • Read JS app state: window.store, React devtools, etc. • Check visibility via CSS: getComputedStyle(el).display, opacity, visibility • Scroll inside a container: document.querySelector('.container').scrollTop += 500 The code is evaluated as an expression — use an IIFE for multi-statement code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to evaluate in the page. For async code use: (async () => { ... })(). Return value is serialized as JSON.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that code is evaluated as an expression and recommends IIFE for multi-statement code, which is a valuable behavioral detail. It also provides examples showing side-effecting operations (dispatching events, appending text) but doesn't warn about potential page crashes or persistent state changes.

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

Conciseness5/5

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

The description is well-structured with a concise opening sentence followed by focused bulleted examples and a crucial closing note about IIFE usage. Every sentence and bullet contributes actionable information without unnecessary fluff.

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

Completeness5/5

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

For a one-parameter tool with no output schema, the description is remarkably complete. It covers what the tool does, when to use it, provides many usage examples, and explains evaluation semantics. The only minor gap is error handling, but the given context is sufficient for an agent to invoke the tool correctly.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds enormous value by giving example code snippets that directly inform how to fill the 'code' parameter. It goes beyond the schema's basic description, making the parameter's possibilities and constraints much clearer.

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 'Execute JavaScript in the page context and return the result,' which is a specific verb+resource definition. It further differentiates itself from siblings by calling itself the 'ESCAPE HATCH for anything the other tools don't cover,' making its unique role explicit.

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

Usage Guidelines5/5

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

It explicitly says to use this tool when other tools don't cover a need, and provides a rich set of concrete use cases (computed styles, app state, drag-and-drop, etc.) that illustrate when it's appropriate. The guidance is clear even though alternatives aren't named individually.

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/emadklenka/mare_browser_mcp'

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