Skip to main content
Glama

camofox_evaluate_js

Execute JavaScript in a live browser page to extract hidden data, inspect element properties, read computed styles, and manipulate the DOM without detection.

Instructions

Execute JavaScript in the browser page context. Runs in isolated scope (invisible to page scripts — safe for anti-detection). Use for: extracting data not visible in accessibility snapshot, checking element properties, reading computed styles, manipulating DOM elements. Requires CAMOFOX_API_KEY only when browser-server authentication is enabled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdYesTab ID from create_tab
timeoutNoExecution timeout in ms (max 30000)
expressionYesJavaScript expression to evaluate (e.g. 'document.title', 'document.querySelectorAll("img").length', 'document.querySelector(".modal").scrollHeight')
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the isolated scope and anti-detection safety feature, which is valuable. It also mentions the API key requirement conditionally. However, it does not describe the return value format, potential side effects of DOM manipulation, or concurrency/error behavior, leaving meaningful gaps.

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 brief yet information-dense. It opens with the primary action, then adds scope/safety, use cases, and an auth condition in a structured way. Every sentence serves a purpose and there is no filler.

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?

The tool is a JavaScript evaluator, which can have complex return values and side effects. The description covers core purpose and usage, but does not explain what the tool returns (the evaluation result), how errors are surfaced, or whether the script runs synchronously. This leaves some context incomplete.

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%, so the baseline is 3. The description adds value by providing concrete expression examples and clarifying that tabId comes from create_tab. This helps the agent understand how to format expressions and where to obtain the tabId.

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?

Begins with a specific verb+resource: 'Execute JavaScript in the browser page context'. Clearly distinguishes from sibling tools such as click, type_text, and snapshot by stating its function and scope. Includes concrete use cases ('extracting data not visible in accessibility snapshot', etc.) that reinforce purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit 'Use for:' scenarios, giving clear context on when to invoke this tool. Also notes a prerequisite (CAMOFOX_API_KEY only when browser-server authentication is enabled). However, it does not explicitly mention when NOT to use it or name alternative tools for other operations, such as clicking or navigating.

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/redf0x1/camofox-mcp'

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