Skip to main content
Glama
Chrome DevTools Debug MCP Server

Chrome DevTools Debug MCP Server

by m4eba

evaluate

Runs JavaScript expressions in the page context and returns breakpoint information when execution hits a breakpoint, supporting timeouts and promise resolution.

Instructions

Evaluate JavaScript expression in the page context. Returns breakpoint info if execution triggers a breakpoint.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "expression": "<expression>"
    },
    "name": "evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNoTimeout in milliseconds. Default: 5000
expressionYesJavaScript expression to evaluate
awaitPromiseNoWait for promise to resolve. Default: false
returnByValueNoReturn result by value. Default: false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one genuine behavioral trait: execution may halt and return breakpoint info. However, it omits that arbitrary JS can mutate page state, that the call may block until the timeout, and whether a debugger session is required — all material for a side-effecting evaluate tool.

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

Conciseness4/5

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

Two sentences, front-loaded with the core action and followed by the notable return behavior; no filler. It is arguably slightly too terse for a side-effecting tool, but nothing is wasted.

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 four-parameter tool with full schema coverage but no output schema, the description gives an adequate one-line return note yet leaves the agent guessing about permissions, debugger prerequisites, and side effects on the page. Minimal but not fully complete for an execute-arbitrary-code tool.

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?

Schema description coverage is 100%, so all four parameters (expression, timeout, awaitPromise, returnByValue) are already documented with defaults in the schema. The description adds no further meaning about semantics, such as how returnByValue interacts with serializable results, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Evaluate JavaScript expression in the page context" names a specific verb and resource and adds the scoping word "page", which implicitly distinguishes it from the frame-scoped sibling evaluate_on_frame. It stops short of explicitly naming that sibling, so the differentiation is inferable rather than stated.

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

Usage Guidelines2/5

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

There is no when-to-use, when-not-to-use, or alternative-routing guidance; the agent must infer from the name that this is the general evaluation entry point and that evaluate_on_frame is for frame contexts. Nothing tells the agent whether the debugger must be attached or what precondition makes evaluation succeed.

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

Deploy Server

Other Tools