Skip to main content
Glama
DB-25

arc-control-mcp

Execute JavaScript

execute_javascript
Destructive

Run JavaScript in an Arc browser tab and return the result. Use it to extract data or interact with page elements via the built-in A helper library.

Instructions

Run JavaScript in a tab and return the result. A bare expression, or a statement body that uses return, both work. The helper library is available as A (A.all, A.one, A.click, A.setValue, A.describe, A.visible).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript to evaluate. An expression returns its value; a statement body returns whatever it returns, or null.
tab_idNoArc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedInput schema / properties / tab_id / description
      Previous value: -"Arc tab id from list_tabs. Omit to use this agent's current tab, falling back to whatever tab is active in Arc."New value: +"Arc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first."
  2. First observedv0.3.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, openWorldHint=true and idempotentHint=false, so the safety profile is covered. The description adds the return contract (expression value vs. statement return or null) and the helper namespace, which is real behavioral value, but it omits execution limits, error behavior, and serializability constraints that matter for arbitrary code execution.

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?

Three short sentences, front-loaded with the core action and result, then evaluation modes, then the helper surface. No filler or restatement of the title.

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?

For an arbitrary-code-execution tool with no output schema, the description covers the action, the two code forms, the return contract, and the helper API, while annotations carry the destructive/open-world profile. It stops short of describing failure modes, timeouts, or result serialization, which are the remaining gaps.

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 description coverage is 100%, so both code and tab_id are already documented (baseline 3). The description goes beyond the schema by naming the A helper library and its members, giving the agent information about what is actually available inside the code parameter that the schema does not supply.

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?

States a specific verb and resource ('Run JavaScript in a tab') plus the outcome ('return the result'). The mention of the A helper library (A.click, A.setValue, A.all) implicitly separates it from the specialized DOM siblings, so an agent can place it without opening the schema.

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

Usage Guidelines3/5

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

The description explains two valid code shapes (bare expression vs. statement body with return), which is implied usage guidance for how to call it, but it never says when to reach for arbitrary JS versus the dedicated siblings (click, fill, query_elements, trusted_click) that overlap with the A helpers it advertises.

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