Skip to main content
Glama

Evaluate JavaScript expression

web_debug_evaluate
Destructive

Evaluate JavaScript expressions in a live browser page context to debug and verify frontend behavior. Rejects side effects unless explicitly allowed for safe testing.

Instructions

Evaluate an expression in the local page runtime. Side effects are rejected unless explicitly enabled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
expressionYes
allowSideEffectsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
dataNo
errorNo
warningsYes
artifactsYes
Behavior4/5

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

The annotation set already flags this as non-read-only and potentially destructive. The description adds a valuable behavioral guardrail: side effects are rejected unless explicitly enabled. This clarifies the actual execution policy beyond what the raw hints communicate.

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 focused sentence that front-loads the core purpose and immediately states the key safety constraint. There is no redundant or filler 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 that an output schema exists and the annotations already convey the safety profile, the description covers the essential tool behavior well. It omits the need for an active session or the relationship to sessionId, which could be clearer, but the local page runtime wording sufficiently implies the session context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the burden of explaining parameter meaning. It only indirectly addresses allowSideEffects and mentions 'expression' in the title, but it does not explain sessionId, the expression evaluation context, or how parameters interact. The schema field names are self-explanatory, but the description adds little parameter-level value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the operation: evaluating an expression in the local page runtime. This distinguishes it from broader browser-action or inspection tools, though it does not explicitly name any sibling tool it differs from.

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?

The description implies the tool is for running JavaScript directly in a page session, but it does not state when to prefer it over alternatives such as web_browser_action, web_next_inspect, or web_issue_capture. No explicit exclusions or conditional routing guidance is provided.

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/MarlonJD/web-debug-mcp'

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