Skip to main content
Glama

flow_eval_js

Run custom JavaScript in the active page of a local Chromium browser to inspect, modify, or interact with web content.

Instructions

Runs custom JavaScript in the active page context on your local browser.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript to execute

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

C2.9/5.0
Behavior2/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 mentions the execution context ('active page context on your local browser') but omits critical traits such as whether the script can mutate the page, security implications, return value behavior, error handling, or async support for a tool that executes arbitrary JavaScript.

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?

A single, front-loaded sentence with no wasted words. It states the action, the resource, and the execution context efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that executes arbitrary JavaScript, the description is insufficient: it does not explain what the script returns, whether it runs as an expression or statement, async handling, or error behavior. With no annotations and no output schema, the description should provide more behavioral context to call it correctly.

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% for the single 'script' parameter, which is already documented as 'JavaScript to execute'. The description adds 'custom JavaScript' but no syntax, format, or execution-semantics details beyond what the schema provides. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Runs') and resource ('custom JavaScript in the active page context on your local browser'), clearly distinguishing it from click, screenshot, and status siblings. However, it does not explicitly differentiate itself from flow_execute_prompt or flow_inspect_canvas, which also operate on page context.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives like flow_execute_prompt or flow_inspect_canvas, nor any prerequisites or exclusions. The description only states what it does, leaving the agent to infer appropriate usage.

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