Skip to main content
Glama

interceptor_browser_evaluate

Execute a JavaScript file in a browser page and receive its return value. Use it to read or modify page state in isolated or main worlds.

Instructions

Execute a JS file in the page and return its result. Source is loaded from script_path (absolute path). The file body is wrapped in an arrow function receiving __args (so the file may return value; directly and access the optional args object). Worlds: isolated (default) or main (camoufox-only, requires main_world_eval: true at launch). Cloakbrowser (Chromium): isolated runs in Playwright's utility world (different window, same DOM). main is rejected — use interceptor_browser_inject_init_script for main-world patching there. Camoufox (cloverlabs/FF150): there is no separate isolated world — both permitted modes run in the page's main world. Reads are invisible to the page; mutations (window.x = …, Object.defineProperty, prototype patches) are observable by page scripts. Earlier daijro/FF135 had a Juggler scope that made isolated invisible to the page; that scope was removed in cloverlabs. Verify on your installed build with scripts/camoufox-world-probe.ts. Rate-limit on cloakbrowser before reCAPTCHA: each call emits CDP traffic that behavioural scorers count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoOptional JSON-serialisable args object, available inside the script as `__args`.
worldNo`isolated` (default) or `main`. On current camoufox build (cloverlabs/FF150) both run in the page's main world — arg is accepted but has no observable effect.isolated
target_idYesTarget ID from interceptor_browser_launch or interceptor_camoufox_launch
script_pathYesAbsolute path to a .js file. File body is the function body; use `return` to send a value back.
value_max_charsNoMax characters of the JSON-stringified return value (default: 20000).
Behavior5/5

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

Discloses multiple behavioral traits: script wrapping in arrow function, world isolation differences, mutation visibility, rate-limiting implications, and provides a verification command. No annotations present, so description fully covers the burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is detailed and front-loaded with the main purpose, but slightly verbose. Could be trimmed while retaining key information, but still well-structured and informative.

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?

Covers environment differences, safety, limitations, and return value truncation. Lacks explicit return value format but infers JSON-stringified result. Adequate for a complex tool with no output schema.

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 has 100% coverage, so baseline is 3. Description adds value by explaining that script_path is absolute, args accessible as __args, world mode details, and default for value_max_chars.

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?

Description clearly states 'Execute a JS file in the page and return its result' with a specific verb and resource. It distinguishes from sibling tools like interceptor_browser_inject_init_script by explaining when to use each.

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?

Provides explicit guidance on when to use isolated vs main world, including platform-specific behavior (Cloakbrowser vs Camoufox) and suggests alternative tool for main-world patching on Chromium.

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/yfe404/proxy-mcp'

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