Skip to main content
Glama
congzhou09

chrome-dev-mcp

evaluate_js

Execute JavaScript expressions in the active Chrome page to interact with and modify web application state at runtime.

Instructions

Evaluate javascript in page. To access the currently selected element in the Elements panel ($0), use get_inspected_element instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes
Behavior2/5

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

With no annotations beyond a title, the description carries the full burden for behavioral disclosure. Evaluating arbitrary JavaScript can cause side effects, modify page state, or access sensitive data, but the description only says 'Evaluate javascript in page' without warning about these risks or explaining what happens upon 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?

The description is extremely concise, consisting of two sentences that front-load the core purpose and add a useful pointer to an alternative. There is no verbose or redundant content, making it easy to parse.

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?

The tool is simple with one parameter and no output schema, but the description lacks essential context for safe and correct use, such as parameter details and potential side effects. The alternative guidance adds some context, but the overall description is adequate only for tool selection, not for confident invocation.

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?

The schema has one parameter ('expression') with 0% description coverage. The tool description indirectly implies that the expression is JavaScript to execute, but it does not clarify whether statements vs. expressions are accepted, return value handling, or async behavior. This is insufficient for an agent to craft correct invocations.

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 that the tool evaluates JavaScript in the page, using a specific verb and resource. It also distinguishes itself from a sibling tool by directing users to get_inspected_element for accessing the selected element ($0), showing awareness of related tools.

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

Usage Guidelines4/5

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

The description provides explicit guidance for an alternative scenario (accessing the selected Element panel element with get_inspected_element). However, it does not mention other relevant alternatives like evaluate_at_frame for evaluating in a specific frame, leaving some usage context implicit.

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/congzhou09/chrome-dev-mcp'

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