Skip to main content
Glama
duquesnay

mcp-chromium-cdp

by duquesnay

chrome_execute_script

Execute JavaScript in the current page and return the result, serving as a fallback for when standard automation tools fail.

Instructions

Execute JavaScript in the current page and return the result. ADVANCED: Use as last resort when chrome_click, chrome_type, or other structured tools cannot accomplish the task. Prefer semantic tools for better reliability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript code to execute
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. While it mentions execution and returning a result, it does not disclose potential side effects (e.g., page navigation, DOM changes, security implications) or limitations like async handling. The 'ADVANCED' and 'last resort' labels hint at risk but do not elaborate on behavioral traits.

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 efficiently concise: two sentences, front-loaded with the core function followed by usage guidance. Every sentence earns its place, with no redundant filler.

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

Completeness3/5

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

For a simple one-parameter tool, it covers the basic purpose and usage. However, it omits important context for an advanced tool: what exactly is returned (e.g., serialized JSON, promise resolution), how errors are handled, and whether the script runs in page context. The lack of an output schema makes these gaps more significant, leaving the agent uncertain about invocation outcomes.

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?

The schema has 100% description coverage for the single 'script' parameter, and the description adds no extra meaning beyond what the schema already conveys. The baseline of 3 applies because the schema does the heavy lifting; the description simply restates 'JavaScript code to execute' without adding specifics like expected patterns or return behavior.

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 clearly states the tool's function: 'Execute JavaScript in the current page and return the result.' It uses a specific verb and resource, and the second sentence differentiates it from sibling structured tools by positioning it as a last resort, which distinguishes it from the other chrome_* tools.

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 provides explicit usage guidance: 'Use as last resort when chrome_click, chrome_type, or other structured tools cannot accomplish the task. Prefer semantic tools for better reliability.' This clearly states when to use and when not to use, and names alternatives.

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/duquesnay/mcp-chromium-cdp'

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