Skip to main content
Glama

browser_evaluate

Execute JavaScript code in a live browser page and return the result, enabling automation, testing, and data extraction.

Instructions

Execute JavaScript in the browser page and return the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript code to execute
Behavior2/5

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

There are no annotations, so the description must carry full behavioral disclosure. It only says 'execute JavaScript and return the result' but does not mention side effects, asynchronous behavior, page navigation, error handling, or what 'result' means. This leaves significant unknown behavior for an agent.

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 a single, front-loaded sentence with no filler. Every word conveys necessary information, and it is structurally clear.

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?

Given the potential complexity of a JavaScript evaluation tool (async, return types, side effects) and the absence of annotations or output schema, this description is incomplete. It does not explain what the result looks like, whether promises are resolved, or how errors are returned, which are critical for safe tool invocation.

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 already describes the sole parameter as 'JavaScript code to execute' with 100% coverage. The description adds no extra meaning beyond the schema, making this a baseline 3.

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 states a specific verb-resource pair: 'Execute JavaScript in the browser page and return the result.' It clearly distinguishes itself from browser_navigate, browser_click, browser_snapshot, etc., which do other operations. The purpose is unmistakable.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus alternatives like browser_content or browser_snapshot. It lacks any context about typical use cases, prerequisites, or scenarios where it is preferred over sibling tools.

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/kcdjmaxx/HomarUScc'

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