Skip to main content
Glama

evaluate_isolated

Execute JavaScript in a sandboxed environment to perform async operations, DOM queries, and data extraction without interfering with page scripts or state.

Instructions

Execute JavaScript in an ISOLATED context (sandboxed, separate from page scripts).

USE THIS TOOL WHEN YOU NEED TO:

  • Make async operations (fetch, setTimeout, Promises)

  • Query/manipulate the DOM without affecting page state

  • Run code that shouldn't interfere with page scripts

  • Perform async data extraction or waiting

LIMITATIONS:

  • CANNOT access window globals (window.NUXT, etc. will be undefined)

  • CANNOT call functions defined by page scripts

  • Only has access to DOM and standard browser APIs

EXAMPLES:

  • "await fetch('/api/data').then(r => r.json())" → Make API calls

  • "document.querySelectorAll('.item').length" → Count elements

  • "await new Promise(r => setTimeout(r, 1000))" → Wait/delay

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdNoPage ID (uses active page if not specified)
scriptYesJavaScript code (async/await allowed). Returns the expression result.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the isolated/sandboxed context, access limitations (no window globals or page scripts, only DOM and standard APIs), and the ability to handle async operations. It doesn't mention error handling, execution timeouts, or security implications, but covers the core behavior well given the lack of annotations.

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?

The description is well-structured with clear sections (purpose, usage guidelines, limitations, examples), front-loaded with the core purpose, and every sentence adds value without redundancy. It's appropriately sized for a tool with behavioral complexity, using bullet points and examples efficiently to convey 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?

Given the tool's complexity (executing JavaScript in an isolated context), no annotations, and no output schema, the description does a strong job of covering key aspects: purpose, usage scenarios, limitations, and examples. It doesn't detail the return format or error behavior, but the examples hint at results. For a tool without structured output documentation, this is nearly complete.

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%, so the schema already documents both parameters ('pageId' and 'script'). The description doesn't add specific meaning beyond what the schema provides for these parameters, though it implies through examples that 'script' can include async/await and returns expression results. This meets the baseline of 3 when schema coverage is high.

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 clearly states the tool's purpose with specific verbs ('Execute JavaScript') and resource ('in an ISOLATED context'), and distinguishes it from sibling tools like 'evaluate_mainworld' by emphasizing the isolated, sandboxed nature. It explicitly mentions what it does (execute JS in isolation) and what it doesn't do (access window globals or page scripts).

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 provides explicit guidance with a 'USE THIS TOOL WHEN YOU NEED TO' section listing four specific scenarios (async operations, DOM query/manipulation without affecting page state, non-interfering code, async data extraction/waiting). It also includes a 'LIMITATIONS' section detailing when NOT to use it (e.g., cannot access window globals or page scripts), offering clear alternatives implicitly by contrast with other tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/baixianger/camoufox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server