Skip to main content
Glama

Evaluate Page JavaScript

browser_eval
Destructive

Run custom JavaScript on the active page to inspect or modify state when standard tools are insufficient. Must acknowledge raw capture and dangerous eval.

Instructions

Use when a full-profile diagnosis cannot be completed with safe DOM, action, wait, or trace tools and exact page-side JavaScript is essential. Preconditions: an active authorized page plus acknowledgeRawCapture: true and acknowledgeDangerousEval: true are required. Next: prefer a targeted inspection tool afterward and document why arbitrary evaluation was necessary. Sensitivity: arbitrary JavaScript can read or modify DOM, storage, page-visible credentials, and remote application state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argNo
maxBytesNo
frameNameNo
timeoutMsNo
expressionYes
frameUrlContainsNo
acknowledgeRawCaptureNo
acknowledgeDangerousEvalNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo
resultNo
Behavior5/5

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

Description adds specifics beyond annotations: 'arbitrary JavaScript can read or modify DOM, storage, page-visible credentials, and remote application state.' Aligns with destructiveHint=true and openWorldHint=true. No contradiction.

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?

Four sentences, each adding value: use case, preconditions, next steps, sensitivity. No redundant information. Well-structured and front-loaded.

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?

Covers when, preconditions, and risks. Does not explicitly describe output format, but output schema exists. Complete enough for an agent to understand the tool's role and safety considerations.

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 coverage 0%, so description must compensate. It clarifies the need for acknowledgeRawCapture and acknowledgeDangerousEval, but does not detail other parameters like maxBytes, frameName, timeoutMs. Partial but inadequate compensation.

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?

Description explicitly states when to use: when safe DOM, action, wait, or trace tools are insufficient and exact JavaScript execution is essential. Clearly distinguishes from sibling tools by focusing on arbitrary evaluation.

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

Usage Guidelines5/5

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

Provides detailed guidance: preconditions (active page, acknowledgeRawCapture and acknowledgeDangerousEval), next steps (prefer targeted tool afterward, document necessity), and sensitivity warning. Excellent context for when and how to use.

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/ss26367098/rawtrace-mcp'

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