Skip to main content
Glama
NolanLT

Local Browser MCP

by NolanLT

browser_eval

Evaluate JavaScript expressions in the current browser page context and retrieve JSON-serializable results. For non-local pages, prompts the user for confirmation before execution.

Instructions

Evaluate a JavaScript expression in the page context and return the JSON-serializable result. On non-local pages this prompts the user for confirmation first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes
Behavior3/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 the confirmation prompt on non-local pages, which is useful, but it doesn't warn about potential side effects of executing arbitrary JS or what happens if the expression throws. The safety behavior is only partially addressed.

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?

Two concise sentences, front-loaded with the core purpose, then a conditional caveat. No unnecessary words or repetition.

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 one-parameter tool with no output schema, the description covers the essential points: what it does, the result format, and a key conditional behavior. It doesn't mention error handling or side effects, but given the low complexity, it is reasonably complete.

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

Parameters4/5

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

Though schema coverage is 0%, the description explicitly defines the single parameter 'expression' as a JavaScript expression to be evaluated in page context, and clarifies that the result must be JSON-serializable. This compensates well for the lack of schema description.

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 uses a specific verb ('Evaluate') and clearly identifies the target ('a JavaScript expression in the page context') and the output ('return the JSON-serializable result'). This is unambiguous and distinguishes it from sibling tools like browser_console or browser_get_text.

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?

It implies usage: use when you need to run JavaScript in the page and get a serializable result. It also gives context about non-local pages prompting for confirmation, but doesn't explicitly contrast with alternatives or state when not to use it.

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/NolanLT/local-browser-mcp'

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