Skip to main content
Glama

browser_evaluate

Run JavaScript code on the current page and capture the result. Use this to extract data, modify the DOM, or trigger events during automated browser sessions.

Instructions

Execute JavaScript code on the 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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It merely states execution and result return, without mentioning important behaviors such as scripts running in page context, potential to modify page state or cause navigation, error handling, or result serialization. This is a significant transparency gap for a powerful execution tool.

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?

A single, front-loaded sentence that conveys the core action and outcome without any filler. Every word earns its place, making it highly concise and well-structured.

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?

Despite having only one parameter, the tool executes arbitrary JavaScript, which introduces moderate complexity. There is no output schema, so the description should explain the return format or behavior (e.g., promises, errors, serialization), but it only says 'return the result'. This leaves significant gaps in understanding the tool's full behavior.

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 input schema fully covers the single parameter 'script' with a clear description. The description text adds no additional insight beyond the schema, so the baseline score of 3 applies, as the schema does the heavy lifting.

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 ('Execute') and resource ('JavaScript code on the page') and clearly states the output ('return the result'). This distinguishes it from sibling tools that perform specific browser actions like clicking, navigating, or reading attributes, making the purpose distinctly clear.

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?

No explicit guidance on when to use this tool versus alternatives, but the description implies it is for running arbitrary JavaScript on the page. Since there is no discussion of when not to use it or alternatives, it falls at the 'implied usage' level rather than providing full context.

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/mazamakasa/octo-mcp'

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