Skip to main content
Glama

dev_eval

Run JavaScript in the Unflick window and get the evaluated result back, letting you handle cases the other five verbs don't cover.

Instructions

Run JavaScript in the unflick window and get back what it evaluated to. Either an expression or statements with an explicit return. The escape hatch for what the other five verbs do not cover — prefer them where they fit, because they report their own refusals in terms of the page.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "script": "<script>"
    },
    "name": "dev_eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYesJavaScript to run.
timeout_secondsNoHow long to wait for an answer. Default 5.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior2/5

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

With no annotations at all, the description carries the full burden, yet it says nothing about side effects on the live page, sandboxing/security posture, what happens on script error or timeout expiry, or how return values are serialized. "Get back what it evaluated to" glosses over the fact that many JS values (functions, DOM nodes, circular objects) cannot be returned faithfully, which is exactly the behavior an agent needs to know before relying on this tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the action and result, then the disambiguation rule. Tight overall, though "in terms of the page" is vague filler and "unflick window" is an unexplained term the agent may not resolve.

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?

There is no output schema and no annotations, and the description does not compensate: return-value shape/serialization, failure modes, and timeout-overrun behavior are all left unaddressed. For a two-parameter arbitrary-code-execution tool, that leaves meaningful gaps, though the core contract and routing guidance are present.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds real meaning beyond the schema's "JavaScript to run": it specifies that the script may be either an expression or statements containing an explicit `return`. That constraint is not stated anywhere in the schema and materially affects how the parameter must be written.

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?

States a specific verb and resource ("Run JavaScript in the unflick window") plus the result contract ("get back what it evaluated to"). It also explicitly positions itself against siblings: "The escape hatch for what the other five verbs do not cover," so an agent can tell it apart from dev_capture/dev_click/dev_snapshot/dev_text/dev_wait without opening 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 Guidelines4/5

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

Gives a clear routing rule — prefer the other five verbs where they fit, because they report refusals in page terms — which is a genuine when-not-to-use signal. It stops short of naming any specific alternative or the concrete conditions (e.g. needing arbitrary DOM computation vs. a simple click) that would trigger the escape hatch.

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

Deploy Server

Other Tools