Skip to main content
Glama
AMARA-Khaled

wrave-mcp

by AMARA-Khaled

wrave_execute_script

Run custom JavaScript directly in a browser tab to inspect or modify page state, automate interactions, and retrieve data without manual steps.

Instructions

Execute arbitrary JavaScript expression in the tab context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript code to evaluate
tab_idYesThe ID of the tab

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of disclosing behavioral traits, but it only states what the tool executes without noting side effects or risks. It does not mention that executing arbitrary JavaScript can mutate page state, break the page, navigate away, or have irreversible consequences, nor does it describe the return behavior. A low-level code-execution tool of this power needs explicit hazard disclosure, which is absent.

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?

The description is a single front-loaded sentence with no filler, making it structurally concise and easy to scan. It earns its place but is under-specified for the operational complexity of the tool.

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 with no output schema and no annotations, the description must compensate by explaining return behavior, scope, and side effects. It does none of that. It doesn't say what the expression's result is, whether asynchronous execution is supported, or what state the tab must be in, leaving an agent with considerable uncertainty before calling it.

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%, so the baseline is 3. The description adds minimal nuance by phrasing 'script' as an 'expression' and placing execution 'in the tab context', but does not meaningfully go beyond the schema's 'JavaScript code to evaluate' and 'The ID of the tab'.

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?

The description uses a specific verb ('Execute') plus a precise resource/context ('arbitrary JavaScript expression in the tab context'), which clearly distinguishes it from all the listed siblings (navigation, DOM, input, cookie, PDF tools). No other sibling offers code evaluation, so an agent can unambiguously identify this as the script-execution tool.

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?

The description provides no guidance on when to choose this tool versus the dedicated browser helpers like wrave_click, wrave_type_text, or wrave_get_dom_tree. There is no mention of alternatives, exclusions, or scenarios where arbitrary JS is the appropriate last resort. The agent is left to infer usage purely from the tool's name and generic description.

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