Skip to main content
Glama

Evaluate Page JavaScript

browse_evaluate
Destructive

Execute JavaScript in a managed browser page to inspect or modify site state using a JSON argument. Use it for scripted interactions that need the site's identity and may change external state.

Instructions

Execute arbitrary JavaScript in one ego-lite Page with one JSON argument. It can use website identity and change external state; it is not read-only.

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": {
      "browseId": "<browseId>",
      "script": "<script>"
    },
    "name": "browse_evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNop1
scriptYes
argumentNo
browseIdYes

Output Schema

NameRequiredDescriptionDefault
pagesNo
resultNo
statusYes
spaceIdNo
browseIdNo
warningsNo
artifactIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and openWorldHint=true, so the description does not need to restate that. It does add genuinely new context: the script runs with website identity (i.e., the session's authenticated context) and can change external state, which is important beyond the annotation flags and warns that this is destructive across the network.

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 short sentences, front-loaded with the action and followed by the risk profile. No filler wording and nothing redundant with the annotations.

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?

An output schema exists, so return values need not be described. However, for a destructive, open-world execution tool the definition omits how browseId relates to an existing page session, how the page parameter selects among pages, and what happens when the script throws. Those gaps leave the agent underinformed before a high-risk call.

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% across four parameters, so the description carries the full burden. It mentions 'one JSON argument' and 'one ego-lite Page', which loosely map to argument and page, but says nothing about browseId (the UUID of an existing browse session), the page selector defaulting to p1, the script size limits, or what argument is passed to the script.

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?

States a specific verb (execute) and resource (arbitrary JavaScript in one ego-lite Page) plus the argument shape. It clearly separates this from read-oriented siblings like browse, fetch, or search, though it never names an alternative explicitly.

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 explicit when-to-use or when-not-to-use guidance and no named alternative for cases where a read-only fetch would suffice. The phrase 'one ego-lite Page' only implicitly signals that a page session must already exist, and 'not read-only' is a warning rather than routing guidance.

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