Skip to main content
Glama

debugger.evaluate_on_frame

Evaluates an expression in a paused call frame so you can inspect local variables and debug runtime state.

Instructions

Evaluate an expression in the scope of a paused call frame: this is how you read local variables.

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": "debugger.evaluate_on_frame"
  }
}

Input Schema

NameRequiredDescriptionDefault
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
expressionYes
frame_indexNo
call_frame_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, and the description is consistent with that (expression evaluation can execute arbitrary code). However, it adds no warning that expressions may have side effects, throw, or fail when not paused, and no note on return format despite there being no output schema.

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?

A single sentence with zero filler, front-loading the scope constraint followed by a colon that delivers the practical payoff. Nothing to trim.

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?

It conveys the core concept but leaves the two-frame-identifier ambiguity unresolved and, with no output schema, never says what evaluation returns or how failures surface. Adequate minimum-viable framing for a 5-parameter debugger tool, not complete.

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?

With 5 parameters and only 40% schema description coverage, the description must compensate and does not. It never explains the choice between frame_index and call_frame_id (the key semantic decision for this tool), nor the defaulting behavior of target_id/browser_id, nor what form 'expression' takes.

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?

Names a specific verb (evaluate) and a specific scope (a paused call frame's scope), plus the practical intent ('this is how you read local variables'). It separates itself from js.evaluate by implying scope-bound evaluation, though it never names the sibling explicitly.

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

Usage Guidelines3/5

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

The phrase 'in the scope of a paused call frame' implies the prerequisite that execution must be paused, and 'read local variables' implies a usage intent. But there is no explicit when-to-use versus js.evaluate or debugger.inspect_object, and no stated behavior when no frame is paused.

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