Skip to main content
Glama
ademdeniz
by ademdeniz

evaluate

Run JavaScript in the browser page to retrieve values, perform assertions, or execute custom interactions. Get results directly from the page context.

Instructions

Execute JavaScript in the browser page context and return the result. Use for assertions, reading DOM values, or custom interactions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesJavaScript expression to evaluate. Must be a valid JS expression (not a statement). Example: "document.title" or "document.querySelector('h1').textContent"
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions 'Execute JavaScript in the browser page context and return the result,' but fails to disclose that arbitrary JavaScript may have side effects on the page, potential error behavior, or that the result format is unspecified. This is a significant gap for a tool that can modify the page.

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, well-structured sentence that front-loads the core function and follows with use cases. Every word earns its place; there is no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description provides enough to understand the tool's purpose and general usage, but lacks critical context about potential side effects, error handling, and return value shape. With no annotations and no output schema, the description should do more to fully set expectations for a JavaScript execution tool.

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?

Schema description coverage is 100% with the 'expression' parameter fully described (valid JS expression, examples). The tool description adds usage context but no additional parameter-specific meaning. Per the rubric, high schema coverage sets a baseline of 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 action: 'Execute JavaScript in the browser page context and return the result.' This clearly distinguishes it from sibling tools like navigate, fill, and click, which handle other browser interactions. It also lists concrete use cases ('assertions, reading DOM values, or custom interactions'), making the tool's purpose unmistakable.

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 explicitly says 'Use for assertions, reading DOM values, or custom interactions,' providing clear context for when to use this tool. However, it does not mention when not to use it or name alternative tools (e.g., assert or get_page_state), so it lacks explicit exclusions. This aligns with 'clear context, no exclusions.'

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/ademdeniz/playwright-mcp'

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