Skip to main content
Glama

evaluate

Destructive

Run JavaScript code in the active browser tab and retrieve the result, enabling page data extraction and dynamic interaction.

Instructions

Run JavaScript in the page and return its value. Your snippet should return something, e.g. return document.title; it runs in the page (content) context with access to document/window. LOCKED by default (powerful) — enable with enable_evaluate first. Best on the Marionette backend; some Floorp builds don't expose it. Active tab unless browserId given.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript to run; use `return` to produce a value.
browserIdNoTarget tab. Defaults to active.
maxCharsNoTruncate the stringified result. Default 25000.
Behavior4/5

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

Annotations indicate destructiveHint=true and openWorldHint=true. The description adds that the tool is 'powerful' and 'locked by default', and runs in the page context with access to document/window. This goes beyond annotations by explaining the need for a separate enable step and backend dependency. No contradiction with annotations.

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 two sentences, each adding value. The first sentence states purpose and requirement to return value; the second adds constraints and backend info. No wasted words; information is front-loaded and easy to parse.

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 complexity and the presence of full parameter schema coverage plus annotations, the description covers key aspects: purpose, return requirement, locked status, backend dependency, and default tab. It does not mention output stringification or error handling, but the schema covers maxChars truncation. Overall, it is sufficiently complete for an AI agent.

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?

Schema coverage is 100%, so baseline is 3. The description adds meaning: it explains that the script must `return` a value, that it runs in content context, and that browserId defaults to the active tab. These details are not in the schema descriptions, thus enhancing parameter understanding.

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 runs JavaScript in the page and returns its value, with specific verb and resource. It mentions the need to `return` a value and that it runs in content context. This differentiates it from sibling tools like click, read_page, etc., 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 Guidelines4/5

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

The description provides context on when to use this tool: for executing arbitrary JS in the page. It notes that it is locked by default and requires enable_evaluate first, and that it works best on Marionette backend (some builds don't expose it). While it doesn't explicitly state when not to use, the sibling tools offer alternatives for specific actions, and the description's constraints guide appropriate usage.

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/Frumane/gecko-mcp'

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