Skip to main content
Glama
congzhou09

chrome-dev-mcp

by congzhou09

evaluate_js

Execute JavaScript expressions in the current page to inspect variables, test functions, or manipulate the DOM during debugging.

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?

No annotations are provided, so the description carries the full burden. It only says 'Evaluate javascript in page,' omitting critical behavioral traits such as side effects, security implications, execution scope, or return value. For a tool that executes arbitrary JS, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short and front-loaded, but it lacks necessary detail. While concise, it sacrifices completeness; every sentence earns its place, but the description is under-specified.

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

Completeness1/5

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

Given the complexity of executing JavaScript (a potentially dangerous operation) and the lack of schema descriptions, output schema, or annotations, the description is incomplete. It does not inform the agent about execution context, async behavior, or error handling.

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

Parameters1/5

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

The input schema has one parameter (expression) with 0% description coverage, and the tool description does not explain the parameter at all. The description fails to add meaning beyond what the schema provides, such as valid syntax or context.

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 evaluates JavaScript in the page, with a specific verb and resource. It also distinguishes from the sibling tool get_inspected_element by advising against using it for accessing the selected element.

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 a specific alternative (get_inspected_element) for a particular use case, which helps avoid misuse. However, it does not offer guidance on when to use this tool versus other sibling tools like evaluate_at_frame or get_scope_variables.

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