Skip to main content
Glama

edge_evaluate

Runs JavaScript in the active Edge page and returns its serialized result, enabling page data extraction, DOM inspection, and scripted browser checks.

Instructions

Execute arbitrary JavaScript code within the context of the active Edge page and return the serialized result.

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": {
      "expression": "<expression>"
    },
    "name": "edge_evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
expressionYesJavaScript code or expression to evaluate (e.g. 'document.title' or 'window.location.href')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full burden and does little: it does not say whether promises/async expressions are awaited, what happens when the result is not serializable, how errors or CSP violations surface, or that this runs with full page privileges. 'Return the serialized result' is the only behavioral hint offered.

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?

A single front-loaded sentence with no filler; the action and its scope appear before the return-value clause. Nothing in it is redundant.

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?

For a one-parameter tool with a fully documented schema and no output schema to explain, the definition covers what it does and what comes back. The remaining gaps are behavioral edge cases (async handling, error and serialization failures) rather than core calling information.

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 is 100% and the schema already supplies examples ('document.title', 'window.location.href'), so the description adds nothing new about the single 'expression' parameter. Baseline 3 applies since the schema does the heavy lifting.

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 uses a specific verb ('Execute') and resource ('arbitrary JavaScript code within the context of the active Edge page'), so the operation is unambiguous. It does not, however, distinguish itself from close siblings such as edge_cdp_execute or edge_get_html, leaving the agent to infer which evaluation path to choose.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no mention of alternatives like edge_cdp_execute or edge_get_html. The phrase 'active Edge page' only implicitly suggests a page must already be open; prerequisites such as navigation state are not stated.

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