Skip to main content
Glama

browser_evaluate

Execute JavaScript code in the browser page to extract data or modify content. Returns JSON-serializable results.

Instructions

Execute JavaScript code in the browser page. The code runs in the page context. Return a JSON-serializable value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript code to execute. Use arrow function for expressions: () => document.title
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It states the code runs in page context but does not disclose potential side effects like DOM modification, navigation, or security implications, which is insufficient for a code 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?

The description is extremely concise with two short sentences, each adding essential information without any redundant or extraneous content.

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?

Given the tool's simplicity (1 parameter, no output schema) and the presence of sibling tools with clear roles, the description is largely complete. It specifies the return type as 'JSON-serializable value', though it could mention error 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 already describes the 'script' parameter with instructions for arrow functions, providing 100% coverage. The description adds no further meaning, earning the baseline score.

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 the tool executes JavaScript code in the browser page and returns a JSON-serializable value, distinguishing it from sibling tools like browser_click or browser_navigate which perform different actions.

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 provides no guidance on when to use this tool versus alternatives, such as browser_get_content or browser_fill. It lacks context about when JavaScript evaluation is appropriate.

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/0xABADBABE-ops/browser-jet-pilot'

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