Skip to main content
Glama
congzhou09

chrome-dev-mcp

evaluate_at_frame

Evaluate JavaScript in a paused call frame to inspect local variables, closures, and this during debugging. Use it when execution is stopped to get readable previews of values at that exact point.

Instructions

Evaluate a JavaScript expression in the scope of a paused call frame — it reads local variables, closure variables and the current this, which evaluate_js cannot. Only works while execution is paused: when it is not, this returns an error rather than silently falling back to global scope. Results come back as a preview — class name plus a first level of properties, marked … where Chrome truncated it — readable, not parseable as the value. Use get_debugger_state to find frame indices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesJS expression to evaluate
frameIndexNoCall frame index (0 = top frame); use get_debugger_state to find available frames

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no meaningful annotations (only a title), the description carries the full behavioral burden and does so well. It discloses error behavior when not paused, the preview-like return format, and the truncation marker ('…'), all of which are beyond what the input schema or annotations provide.

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?

Each of the four sentences adds distinct information: scope capability, paused requirement, return preview details, and how to get frame indices. No filler or redundancy, and the most important clause is front-loaded.

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

Completeness5/5

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

The description covers the tool's core behavior, constraints, return format, and required prerequisite tool, which is complete for an evaluation tool with no output schema. An agent can correctly decide when and how to invoke it without needing to infer anything crucial.

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

Parameters4/5

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

The schema already has 100% coverage with decent parameter descriptions. The tool description adds context for the expression parameter (evaluates in frame scope, reads locals/closure/this) but the frameIndex guidance is largely duplicated from the schema's own description. Still, the added scope context justifies a slight lift from the baseline 3.

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 starts with a specific verb and resource: 'Evaluate a JavaScript expression in the scope of a paused call frame'. It also distinguishes itself from the sibling evaluate_js by noting it cannot read frame-local variables, which makes the tool's purpose unambiguous, even compared to similar 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 explicitly states the core precondition: 'Only works while execution is paused', and explains the failure mode if violated. It names the alternative (evaluate_js) and points to get_debugger_state for finding frame indices, giving clear when-to-use and prerequisite guidance with no ambiguity.

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