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.

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