Skip to main content
Glama

Robot Actions — Remote Device Control

web_evaluate

Run JavaScript in the DESKTOP grid browser page (by pageId) and return the result. Not a device — for a phone or tablet use android_devtools_evaluate or ios_safari_evaluate (by udid).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesPage ID from web_navigate
scriptYesJavaScript expression to evaluate (e.g. "document.title" or "() => window.location.href")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries full behavioral burden. It clearly states that the tool runs JS and returns a result, which is the core behavioravorites. However, it does not disclose execution context (e.g., page scope, access to DOM), serialization of return values, error or timeout behavior, or whether arbitrary side effects are possible. This leaves some ambiguity 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?

Two sentences, no filler. The first sentence states the operation and target, the second gives the critical exclusion. Information is front-loaded and every word contributes to selecting or invoking the tool correctly.

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 schema documents all parameters, but there is no output schema and the description only vaguely says 'return the result.' It does not specify how the result is serialized, whether promises/async are handled, what happens on script errors, or if there are timeouts. For a tool that evaluates arbitrary JS, this return-format ambiguity is a notable gap, though the core call path is clear.

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 covers both parameters at 100% with helpful descriptions (e.g., 'Page ID from web_navigate' and the expression examples), so the baseline is 3. The tool description adds little beyond reinforcing that pageId refers to a 'DESKTOP grid browser page' and clarifying the alternative device context, but it does not introduce new parameter-level meaning.

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 says exactly what it does: 'Run JavaScript in the DESKTOP grid browser page (by pageId) and return the result.' The verb 'run JavaScript' and the resource 'DESKTOP grid browser page' are unambiguous, and the explicit contrast with device tools ('Not a device...') distinguishes it from android_devtools_evaluate and ios_safari_evaluate without needing to inspect their schemas.

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?

The description directly tells the agent when not to use this tool: 'for a phone or tablet use android_devtools_evaluate or ios_safari_evaluate (by udid).' This is an explicit alternative-routing instruction that removes inference, satisfying the highest bar for usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources