Skip to main content
Glama
yinnho

AginxBrowser

eval

Run JavaScript in a fresh browser context on any URL, with optional wait time, and get the evaluated result plus the final URL after any script-driven navigation.

Instructions

Execute JavaScript on a one-off page: loads url in a fresh browser context, optionally waits wait_secs for the page to settle, evaluates script (async/Promise supported) and returns {url, result}. Script-driven navigation (location.href, form submit) is drained and reflected in the returned url. Stateless — no cookies or page state shared with other calls; when the script needs prior page state or a login, use session_eval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to load
scriptYesJavaScript code to execute (supports async/Promise)
wait_secsNoSeconds to wait before executing

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • removedInput schema / title
      Removed value: -"EvalParams"
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations provide only a title, so the description carries the full behavioral burden. It discloses fresh browser context, optional wait, async/Promise support, statelessness, no cookie/page-state sharing, and navigation being drained into the returned `url`. It does not mention error handling, timeouts, or broader side effects of executing arbitrary JavaScript, but the core execution model is clearly explained.

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?

Three efficient sentences with the main action and return value front-loaded, followed by a navigation edge case and a statelessness caveat with the sibling alternative. No filler or redundant restating of the schema.

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?

Given no output schema and minimal annotations, the description covers the essential invocation details: return shape, stateless boundary, navigation handling, and when to choose `session_eval`. Minor gaps remain around error/timeout behavior and exact script execution scope, but the description is sufficient for correct use.

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%, but the description adds meaning beyond the schema: `url` is loaded in a fresh browser context, `wait_secs` is for the page to settle, and `script` supports async/Promise. This contextualizes the parameters better than the terse JSON Schema descriptions alone.

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 precise action ('Execute JavaScript'), a specific resource ('a one-off page' loaded from `url`), and a clear return shape (`{url, result}`). It also distinguishes itself from sibling `session_eval` by explicitly noting that this tool is stateless.

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 explicitly names `session_eval` as the alternative when prior page state or login is needed, giving a concrete when-not-to-use condition. It also implies the appropriate use case: one-off, stateless JavaScript evaluation on a fresh page.

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