Skip to main content
Glama
sa2web

sa2web-mcp

by sa2web

browser_run_code

Execute asynchronous JavaScript code in a browser using Playwright's page and iframe helpers for dynamic web interactions.

Instructions

Run an async JavaScript snippet with Playwright page and iframe#rbi-frame helpers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
Behavior2/5

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

Given no annotations, the description must fully disclose behavioral traits. It mentions the snippet is async and uses page and iframe helpers but omits critical details: return values, error propagation, timeouts, side effects on page state, and security implications. This is insufficient for a powerful code execution tool.

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 a single concise sentence that front-loads the core purpose. Every word adds value: 'Run', 'async JavaScript snippet', 'with Playwright page and iframe#rbi-frame helpers'. No redundant or unnecessary text.

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 code, the description is too brief. It fails to explain important aspects like what the snippet can access, whether there is a return value, how errors are handled, or any limitations. With no output schema and no annotations, the agent lacks essential information to use the tool correctly and safely.

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?

With 0% schema coverage, the description adds some meaning by specifying the code is an 'async JavaScript snippet'. However, it does not clarify whether the code expects specific variables (e.g., page), any constraints (e.g., not to use require), or how to reference the helpers. The description partially compensates but lacks depth.

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 clearly states the tool runs an async JavaScript snippet with Playwright page and helpers, distinguishing it from sibling browser tools focused on navigation, selection, and other interactions. It uses a specific verb and resource, though 'helpers' could be elaborated.

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?

No guidance is provided on when to use this tool versus alternatives. For instance, there is no mention of scenarios where executing JavaScript is preferable to using other browser tools like fill_form or click. This lack of context limits effective tool selection.

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/sa2web/sa2web-mcp'

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