Skip to main content
Glama

Robot Actions — Remote Device Control

Web evaluate

web_evaluate
Destructive

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.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, openWorldHint=true and idempotentHint=false, so the agent knows this is an arbitrary-code, state-mutating, non-idempotent operation. The description adds the platform scope (desktop page vs device) but says nothing about execution side effects, timeouts, or what happens if the script mutates the page. It adds some value beyond the annotations, but not rich behavioral context.

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 compact sentences with zero filler, and the core purpose plus its platform scope are front-loaded before the alternative-tool routing. Every clause carries information.

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?

With only two fully documented parameters and no output schema, the description plus schema is nearly sufficient: the return value is the script's result. Minor gaps remain around evaluation semantics (sync vs async expressions, serialization of non-primitive results, timeouts), but these are secondary for this 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% for both parameters, so the schema already explains pageId (from web_navigate) and the script format with examples. The description's 'by pageId' merely echoes the schema without adding format, constraint, or return-shape detail. Baseline 3 is appropriate.

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 verb and resource (run JavaScript in the desktop grid browser page, keyed by pageId) and explicitly contrasts it with the device-targeted evaluate tools. An agent can distinguish it from android_devtools_evaluate and ios_safari_evaluate without opening any schema.

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?

It gives explicit routing: this is for the DESKTOP grid browser, and for a phone or tablet the agent should use android_devtools_evaluate or ios_safari_evaluate by udid. The when-to-use-vs-alternative condition is stated outright rather than implied.

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