Skip to main content
Glama

chrome_javascript

Execute JavaScript in a Chrome tab to extract data, submit forms, or scroll to elements, returning the result for actions not covered by other tools.

Instructions

Run JavaScript in a Chrome tab and return the result. Use for anything the other chrome_ tools do not cover - extracting data, submitting a form, scrolling to an element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceNo
tab_idNo
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/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 behavioral disclosure. It states that JavaScript is run and a result is returned but does not disclose side effects, execution context, async behavior, error handling, or what state changes may occur. For an arbitrary code-execution tool, this is a significant transparency gap.

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?

Two sentences with no filler. The core action is front-loaded, and the second sentence adds scope and examples without redundancy. Every word earns its place.

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?

An output schema exists, so return-value documentation is not required from the description. However, no annotations and weak parameter semantics leave the agent uncertain about which tab or device will be used, whether an existing tab is required, and what limitations apply. For a powerful generic tool, this is not complete enough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It makes 'expression' obvious from the tool name and description, and 'in a Chrome tab' hints at tab_id, but 'device' and the relationship between device, tab_id, and the required expression are left unexplained. The defaults are not interpreted.

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 begins with a specific verb and resource: 'Run JavaScript in a Chrome tab and return the result.' It also differentiates from the chrome_ sibling family by framing this as the catch-all fallback with concrete examples like extracting data, submitting a form, and scrolling to an element.

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

Usage Guidelines5/5

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

The description explicitly says to use this tool for 'anything the other chrome_ tools do not cover,' which gives a clear selection rule against an entire set of siblings. The examples further clarify the intended use cases and imply that if a specialized chrome_ tool applies, it should be preferred.

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